Container for the parameters to the ListVPCAssociationAuthorizations operation. Gets a list of the VPCs that were created by other accounts and that can be associated with a specified hosted zone because you've submitted one or more CreateVPCAssociationAuthorization requests.

Send a GET request to the /2013-04-01/hostedzone/hosted zone ID/authorizevpcassociation resource. The response to this request includes a VPCs element with a VPC child element for each VPC that can be associated with the hosted zone.

Amazon Route 53 returns up to 50 VPCs per page. To return fewer VPCs per page, include the MaxResults parameter:

/2013-04-01/hostedzone/hosted zone ID/authorizevpcassociation?MaxItems=VPCs per page

If the response includes a NextToken element, there are more VPCs to list. To get the next page of VPCs, submit another ListVPCAssociationAuthorizations request, and include the value of the NextToken element from the response in the NextToken request parameter:

/2013-04-01/hostedzone/hosted zone ID/authorizevpcassociation?MaxItems=VPCs per page&NextToken=

Inheritance: AmazonRoute53Request
Beispiel #1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Route53.Model.ListVPCAssociationAuthorizationsRequest();

            if (cmdletContext.HostedZoneId != null)
            {
                request.HostedZoneId = cmdletContext.HostedZoneId;
            }
            if (cmdletContext.NextToken != null)
            {
                request.NextToken = cmdletContext.NextToken;
            }
            if (cmdletContext.MaxResult != null)
            {
                request.MaxResults = cmdletContext.MaxResult;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
Beispiel #2
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListVPCAssociationAuthorizations operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListVPCAssociationAuthorizations operation on AmazonRoute53Client.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListVPCAssociationAuthorizations
        ///         operation.</returns>
        public IAsyncResult BeginListVPCAssociationAuthorizations(ListVPCAssociationAuthorizationsRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new ListVPCAssociationAuthorizationsRequestMarshaller();
            var unmarshaller = ListVPCAssociationAuthorizationsResponseUnmarshaller.Instance;

            return BeginInvoke<ListVPCAssociationAuthorizationsRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
Beispiel #3
0
        /// <summary>
        /// Gets a list of the VPCs that were created by other accounts and that can be associated
        /// with a specified hosted zone because you've submitted one or more <code>CreateVPCAssociationAuthorization</code>
        /// requests. 
        /// 
        ///  
        /// <para>
        /// Send a <code>GET</code> request to the <code>/2013-04-01/hostedzone/<i>hosted zone
        /// ID</i>/authorizevpcassociation</code> resource. The response to this request includes
        /// a <code>VPCs</code> element with a <code>VPC</code> child element for each VPC that
        /// can be associated with the hosted zone.
        /// </para>
        ///  
        /// <para>
        /// Amazon Route 53 returns up to 50 VPCs per page. To return fewer VPCs per page, include
        /// the <code>MaxResults</code> parameter: 
        /// </para>
        ///  
        /// <para>
        ///  <code>/2013-04-01/hostedzone/<i>hosted zone ID</i>/authorizevpcassociation?MaxItems=<i>VPCs
        /// per page</i> </code> 
        /// </para>
        ///  
        /// <para>
        /// If the response includes a <code>NextToken</code> element, there are more VPCs to
        /// list. To get the next page of VPCs, submit another <code>ListVPCAssociationAuthorizations</code>
        /// request, and include the value of the <code>NextToken</code> element from the response
        /// in the <code>NextToken</code> request parameter:
        /// </para>
        ///  
        /// <para>
        ///  <code>/2013-04-01/hostedzone/<i>hosted zone ID</i>/authorizevpcassociation?MaxItems=<i>VPCs
        /// per page</i>&amp;NextToken=<i/> </code> 
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListVPCAssociationAuthorizations service method.</param>
        /// 
        /// <returns>The response from the ListVPCAssociationAuthorizations service method, as returned by Route53.</returns>
        /// <exception cref="Amazon.Route53.Model.InvalidInputException">
        /// The input is not valid.
        /// </exception>
        /// <exception cref="Amazon.Route53.Model.InvalidPaginationTokenException">
        /// 
        /// </exception>
        /// <exception cref="Amazon.Route53.Model.NoSuchHostedZoneException">
        /// No hosted zone exists with the ID that you specified.
        /// </exception>
        public ListVPCAssociationAuthorizationsResponse ListVPCAssociationAuthorizations(ListVPCAssociationAuthorizationsRequest request)
        {
            var marshaller = new ListVPCAssociationAuthorizationsRequestMarshaller();
            var unmarshaller = ListVPCAssociationAuthorizationsResponseUnmarshaller.Instance;

            return Invoke<ListVPCAssociationAuthorizationsRequest,ListVPCAssociationAuthorizationsResponse>(request, marshaller, unmarshaller);
        }
Beispiel #4
0
 private Amazon.Route53.Model.ListVPCAssociationAuthorizationsResponse CallAWSServiceOperation(IAmazonRoute53 client, Amazon.Route53.Model.ListVPCAssociationAuthorizationsRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Route 53", "ListVPCAssociationAuthorizations");
     try
     {
         #if DESKTOP
         return(client.ListVPCAssociationAuthorizations(request));
         #elif CORECLR
         return(client.ListVPCAssociationAuthorizationsAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
Beispiel #5
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListVPCAssociationAuthorizations operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListVPCAssociationAuthorizations operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<ListVPCAssociationAuthorizationsResponse> ListVPCAssociationAuthorizationsAsync(ListVPCAssociationAuthorizationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListVPCAssociationAuthorizationsRequestMarshaller();
            var unmarshaller = ListVPCAssociationAuthorizationsResponseUnmarshaller.Instance;

            return InvokeAsync<ListVPCAssociationAuthorizationsRequest,ListVPCAssociationAuthorizationsResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }