/// <summary> /// Initiates the asynchronous execution of the CreateVPCAssociationAuthorization operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateVPCAssociationAuthorization 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 EndCreateVPCAssociationAuthorization /// operation.</returns> public IAsyncResult BeginCreateVPCAssociationAuthorization(CreateVPCAssociationAuthorizationRequest request, AsyncCallback callback, object state) { var marshaller = new CreateVPCAssociationAuthorizationRequestMarshaller(); var unmarshaller = CreateVPCAssociationAuthorizationResponseUnmarshaller.Instance; return BeginInvoke<CreateVPCAssociationAuthorizationRequest>(request, marshaller, unmarshaller, callback, state); }
public void CreateVPCAssociationAuthorizationMarshallTest() { var operation = service_model.FindOperation("CreateVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute<CreateVPCAssociationAuthorizationRequest>(); var marshaller = new CreateVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); RequestValidator.Validate("CreateVPCAssociationAuthorization", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateVPCAssociationAuthorizationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateVPCAssociationAuthorizationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Authorizes the AWS account that created a specified VPC to submit an <code>AssociateVPCWithHostedZone</code> /// request to associate the VPC with a specified hosted zone that was created by a different /// account. To submit a <code>CreateVPCAssociationAuthorization</code> request, you must /// use the account that created the hosted zone. After you authorize the association, /// use the account that created the VPC to submit an <code>AssociateVPCWithHostedZone</code> /// request. /// /// <note> /// <para> /// If you want to associate multiple VPCs that you created by using one account with /// a hosted zone that you created by using a different account, you must submit one authorization /// request for each VPC. /// </para> /// </note> /// <para> /// Send a <code>POST</code> request to the <code>/2013-04-01/hostedzone/<i>hosted zone /// ID</i>/authorizevpcassociation</code> resource. The request body must include a document /// with a <code>CreateVPCAssociationAuthorizationRequest</code> element. The response /// contains information about the authorization. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateVPCAssociationAuthorization service method.</param> /// /// <returns>The response from the CreateVPCAssociationAuthorization service method, as returned by Route53.</returns> /// <exception cref="Amazon.Route53.Model.InvalidInputException"> /// The input is not valid. /// </exception> /// <exception cref="Amazon.Route53.Model.InvalidVPCIdException"> /// The VPC ID that you specified either isn't a valid ID or the current account is not /// authorized to access this VPC. /// </exception> /// <exception cref="Amazon.Route53.Model.NoSuchHostedZoneException"> /// No hosted zone exists with the ID that you specified. /// </exception> /// <exception cref="Amazon.Route53.Model.TooManyVPCAssociationAuthorizationsException"> /// You've created the maximum number of authorizations that can be created for the specified /// hosted zone. To authorize another VPC to be associated with the hosted zone, submit /// a <code>DeleteVPCAssociationAuthorization</code> request to remove an existing authorization. /// To get a list of existing authorizations, submit a <code>ListVPCAssociationAuthorizations</code> /// request. /// </exception> public CreateVPCAssociationAuthorizationResponse CreateVPCAssociationAuthorization(CreateVPCAssociationAuthorizationRequest request) { var marshaller = new CreateVPCAssociationAuthorizationRequestMarshaller(); var unmarshaller = CreateVPCAssociationAuthorizationResponseUnmarshaller.Instance; return Invoke<CreateVPCAssociationAuthorizationRequest,CreateVPCAssociationAuthorizationResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateVPCAssociationAuthorization operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateVPCAssociationAuthorization 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<CreateVPCAssociationAuthorizationResponse> CreateVPCAssociationAuthorizationAsync(CreateVPCAssociationAuthorizationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateVPCAssociationAuthorizationRequestMarshaller(); var unmarshaller = CreateVPCAssociationAuthorizationResponseUnmarshaller.Instance; return InvokeAsync<CreateVPCAssociationAuthorizationRequest,CreateVPCAssociationAuthorizationResponse>(request, marshaller, unmarshaller, cancellationToken); }