/// <summary> /// Initiates the asynchronous execution of the AttachVpnGateway operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AttachVpnGateway 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<AttachVpnGatewayResponse> AttachVpnGatewayAsync(AttachVpnGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AttachVpnGatewayRequestMarshaller(); var unmarshaller = AttachVpnGatewayResponseUnmarshaller.Instance; return InvokeAsync<AttachVpnGatewayRequest,AttachVpnGatewayResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void AttachVpnGatewayMarshallTest() { var operation = service_model.FindOperation("AttachVpnGateway"); var request = InstantiateClassGenerator.Execute<AttachVpnGatewayRequest>(); var marshaller = new AttachVpnGatewayRequestMarshaller(); 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 = AttachVpnGatewayResponseUnmarshaller.Instance.Unmarshall(context) as AttachVpnGatewayResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Attaches a virtual private gateway to a VPC. For more information, see <a href="http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html">Adding /// a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private /// Cloud User Guide</i>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the AttachVpnGateway service method.</param> /// /// <returns>The response from the AttachVpnGateway service method, as returned by EC2.</returns> public AttachVpnGatewayResponse AttachVpnGateway(AttachVpnGatewayRequest request) { var marshaller = new AttachVpnGatewayRequestMarshaller(); var unmarshaller = AttachVpnGatewayResponseUnmarshaller.Instance; return Invoke<AttachVpnGatewayRequest,AttachVpnGatewayResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the AttachVpnGateway operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AttachVpnGateway 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 EndAttachVpnGateway /// operation.</returns> public IAsyncResult BeginAttachVpnGateway(AttachVpnGatewayRequest request, AsyncCallback callback, object state) { var marshaller = new AttachVpnGatewayRequestMarshaller(); var unmarshaller = AttachVpnGatewayResponseUnmarshaller.Instance; return BeginInvoke<AttachVpnGatewayRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeAttachVpnGateway(AttachVpnGatewayRequest attachVpnGatewayRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new AttachVpnGatewayRequestMarshaller().Marshall(attachVpnGatewayRequest); var unmarshaller = AttachVpnGatewayResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Attaches a virtual private gateway to a VPC. For more information, see <a href="http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the /// <i>Amazon Virtual Private Cloud User Guide</i> .</para> /// </summary> /// /// <param name="attachVpnGatewayRequest">Container for the necessary parameters to execute the AttachVpnGateway service method on /// AmazonEC2.</param> /// /// <returns>The response from the AttachVpnGateway 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<AttachVpnGatewayResponse> AttachVpnGatewayAsync(AttachVpnGatewayRequest attachVpnGatewayRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AttachVpnGatewayRequestMarshaller(); var unmarshaller = AttachVpnGatewayResponseUnmarshaller.GetInstance(); return Invoke<IRequest, AttachVpnGatewayRequest, AttachVpnGatewayResponse>(attachVpnGatewayRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the AttachVpnGateway operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.AttachVpnGateway"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AttachVpnGateway 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<AttachVpnGatewayResponse> AttachVpnGatewayAsync(AttachVpnGatewayRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AttachVpnGatewayRequestMarshaller(); var unmarshaller = AttachVpnGatewayResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, AttachVpnGatewayRequest, AttachVpnGatewayResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }