/// <summary> /// Initiates the asynchronous execution of the AssociateRouteTable operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AssociateRouteTable 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<AssociateRouteTableResponse> AssociateRouteTableAsync(AssociateRouteTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AssociateRouteTableRequestMarshaller(); var unmarshaller = AssociateRouteTableResponseUnmarshaller.Instance; return InvokeAsync<AssociateRouteTableRequest,AssociateRouteTableResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void AssociateRouteTableMarshallTest() { var operation = service_model.FindOperation("AssociateRouteTable"); var request = InstantiateClassGenerator.Execute<AssociateRouteTableRequest>(); var marshaller = new AssociateRouteTableRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); UnmarshallerContext context = new EC2UnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, new WebResponseData()); var response = AssociateRouteTableResponseUnmarshaller.Instance.Unmarshall(context) as AssociateRouteTableResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Associates a subnet with a route table. The subnet and route table must be in the /// same VPC. This association causes traffic originating from the subnet to be routed /// according to the routes in the route table. The action returns an association ID, /// which you need in order to disassociate the route table from the subnet later. A route /// table can be associated with multiple subnets. /// /// /// <para> /// For more information about route tables, see <a href="http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html">Route /// Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the AssociateRouteTable service method.</param> /// /// <returns>The response from the AssociateRouteTable service method, as returned by EC2.</returns> public AssociateRouteTableResponse AssociateRouteTable(AssociateRouteTableRequest request) { var marshaller = new AssociateRouteTableRequestMarshaller(); var unmarshaller = AssociateRouteTableResponseUnmarshaller.Instance; return Invoke<AssociateRouteTableRequest,AssociateRouteTableResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the AssociateRouteTable operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AssociateRouteTable operation on AmazonEC2Client.</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 EndAssociateRouteTable /// operation.</returns> public IAsyncResult BeginAssociateRouteTable(AssociateRouteTableRequest request, AsyncCallback callback, object state) { var marshaller = new AssociateRouteTableRequestMarshaller(); var unmarshaller = AssociateRouteTableResponseUnmarshaller.Instance; return BeginInvoke<AssociateRouteTableRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeAssociateRouteTable(AssociateRouteTableRequest associateRouteTableRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new AssociateRouteTableRequestMarshaller().Marshall(associateRouteTableRequest); var unmarshaller = AssociateRouteTableResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic /// originating from the subnet to be routed according to the routes in the route table. The action returns an association ID, which you need in /// order to disassociate the route table from the subnet later. A route table can be associated with multiple subnets.</para> <para>For more /// information about route tables, see <a href="http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html">Route Tables</a> /// in the <i>Amazon Virtual Private Cloud User Guide</i> .</para> /// </summary> /// /// <param name="associateRouteTableRequest">Container for the necessary parameters to execute the AssociateRouteTable service method on /// AmazonEC2.</param> /// /// <returns>The response from the AssociateRouteTable service method, as returned by AmazonEC2.</returns> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<AssociateRouteTableResponse> AssociateRouteTableAsync(AssociateRouteTableRequest associateRouteTableRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AssociateRouteTableRequestMarshaller(); var unmarshaller = AssociateRouteTableResponseUnmarshaller.GetInstance(); return Invoke<IRequest, AssociateRouteTableRequest, AssociateRouteTableResponse>(associateRouteTableRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the AssociateRouteTable operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.AssociateRouteTable"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AssociateRouteTable 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 async Task<AssociateRouteTableResponse> AssociateRouteTableAsync(AssociateRouteTableRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AssociateRouteTableRequestMarshaller(); var unmarshaller = AssociateRouteTableResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, AssociateRouteTableRequest, AssociateRouteTableResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }