/// <summary> /// Initiates the asynchronous execution of the CreateVpnConnection operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateVpnConnection 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<CreateVpnConnectionResponse> CreateVpnConnectionAsync(CreateVpnConnectionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateVpnConnectionRequestMarshaller(); var unmarshaller = CreateVpnConnectionResponseUnmarshaller.Instance; return InvokeAsync<CreateVpnConnectionRequest,CreateVpnConnectionResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void CreateVpnConnectionMarshallTest() { var operation = service_model.FindOperation("CreateVpnConnection"); var request = InstantiateClassGenerator.Execute<CreateVpnConnectionRequest>(); var marshaller = new CreateVpnConnectionRequestMarshaller(); 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 = CreateVpnConnectionResponseUnmarshaller.Instance.Unmarshall(context) as CreateVpnConnectionResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Creates a VPN connection between an existing virtual private gateway and a VPN customer /// gateway. The only supported connection type is <code>ipsec.1</code>. /// /// /// <para> /// The response includes information that you need to give to your network administrator /// to configure your customer gateway. /// </para> /// <important> /// <para> /// We strongly recommend that you use HTTPS when calling this operation because the response /// contains sensitive cryptographic information for configuring your customer gateway. /// </para> /// </important> /// <para> /// If you decide to shut down your VPN connection for any reason and later create a new /// VPN connection, you must reconfigure your customer gateway with the new information /// returned from this call. /// </para> /// /// <para> /// For more information about VPN connections, 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="request">Container for the necessary parameters to execute the CreateVpnConnection service method.</param> /// /// <returns>The response from the CreateVpnConnection service method, as returned by EC2.</returns> public CreateVpnConnectionResponse CreateVpnConnection(CreateVpnConnectionRequest request) { var marshaller = new CreateVpnConnectionRequestMarshaller(); var unmarshaller = CreateVpnConnectionResponseUnmarshaller.Instance; return Invoke<CreateVpnConnectionRequest,CreateVpnConnectionResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateVpnConnection operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateVpnConnection 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 EndCreateVpnConnection /// operation.</returns> public IAsyncResult BeginCreateVpnConnection(CreateVpnConnectionRequest request, AsyncCallback callback, object state) { var marshaller = new CreateVpnConnectionRequestMarshaller(); var unmarshaller = CreateVpnConnectionResponseUnmarshaller.Instance; return BeginInvoke<CreateVpnConnectionRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeCreateVpnConnection(CreateVpnConnectionRequest createVpnConnectionRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateVpnConnectionRequestMarshaller().Marshall(createVpnConnectionRequest); var unmarshaller = CreateVpnConnectionResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Creates a VPN connection between an existing virtual private gateway and a VPN customer gateway. The only supported connection type is /// <c>ipsec.1</c> .</para> <para>The response includes information that you need to give to your network administrator to configure your /// customer gateway.</para> <para><b>IMPORTANT:</b> We strongly recommend that you use HTTPS when calling this operation because the response /// contains sensitive cryptographic information for configuring your customer gateway. </para> <para>If you decide to shut down your VPN /// connection for any reason and later create a new VPN connection, you must reconfigure your customer gateway with the new information /// returned from this call.</para> <para>For more information about VPN connections, 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="createVpnConnectionRequest">Container for the necessary parameters to execute the CreateVpnConnection service method on /// AmazonEC2.</param> /// /// <returns>The response from the CreateVpnConnection 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<CreateVpnConnectionResponse> CreateVpnConnectionAsync(CreateVpnConnectionRequest createVpnConnectionRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateVpnConnectionRequestMarshaller(); var unmarshaller = CreateVpnConnectionResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateVpnConnectionRequest, CreateVpnConnectionResponse>(createVpnConnectionRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the CreateVpnConnection operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.CreateVpnConnection"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateVpnConnection 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<CreateVpnConnectionResponse> CreateVpnConnectionAsync(CreateVpnConnectionRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateVpnConnectionRequestMarshaller(); var unmarshaller = CreateVpnConnectionResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateVpnConnectionRequest, CreateVpnConnectionResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }