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); }
/// <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); }
/// <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>&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); }
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; } }
/// <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); }