/// <summary> /// Initiates the asynchronous execution of the CreateCustomerGateway operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateCustomerGateway 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<CreateCustomerGatewayResponse> CreateCustomerGatewayAsync(CreateCustomerGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateCustomerGatewayRequestMarshaller(); var unmarshaller = CreateCustomerGatewayResponseUnmarshaller.Instance; return InvokeAsync<CreateCustomerGatewayRequest,CreateCustomerGatewayResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void CreateCustomerGatewayMarshallTest() { var operation = service_model.FindOperation("CreateCustomerGateway"); var request = InstantiateClassGenerator.Execute<CreateCustomerGatewayRequest>(); var marshaller = new CreateCustomerGatewayRequestMarshaller(); 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 = CreateCustomerGatewayResponseUnmarshaller.Instance.Unmarshall(context) as CreateCustomerGatewayResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Provides information to AWS about your VPN customer gateway device. The customer gateway /// is the appliance at your end of the VPN connection. (The device on the AWS side of /// the VPN connection is the virtual private gateway.) You must provide the Internet-routable /// IP address of the customer gateway's external interface. The IP address must be static /// and can't be behind a device performing network address translation (NAT). /// /// /// <para> /// For devices that use Border Gateway Protocol (BGP), you can also provide the device's /// BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. /// If you don't have an ASN already, you can use a private ASN (in the 64512 - 65534 /// range). /// </para> /// <note> /// <para> /// Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with the exception /// of 7224, which is reserved in the <code>us-east-1</code> region, and 9059, which is /// reserved in the <code>eu-west-1</code> region. /// </para> /// </note> /// <para> /// For more information about VPN customer gateways, 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> /// <important> /// <para> /// You cannot create more than one customer gateway with the same VPN type, IP address, /// and BGP ASN parameter values. If you run an identical request more than one time, /// the first request creates the customer gateway, and subsequent requests return information /// about the existing customer gateway. The subsequent requests do not create new customer /// gateway resources. /// </para> /// </important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateCustomerGateway service method.</param> /// /// <returns>The response from the CreateCustomerGateway service method, as returned by EC2.</returns> public CreateCustomerGatewayResponse CreateCustomerGateway(CreateCustomerGatewayRequest request) { var marshaller = new CreateCustomerGatewayRequestMarshaller(); var unmarshaller = CreateCustomerGatewayResponseUnmarshaller.Instance; return Invoke<CreateCustomerGatewayRequest,CreateCustomerGatewayResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateCustomerGateway operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateCustomerGateway 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 EndCreateCustomerGateway /// operation.</returns> public IAsyncResult BeginCreateCustomerGateway(CreateCustomerGatewayRequest request, AsyncCallback callback, object state) { var marshaller = new CreateCustomerGatewayRequestMarshaller(); var unmarshaller = CreateCustomerGatewayResponseUnmarshaller.Instance; return BeginInvoke<CreateCustomerGatewayRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeCreateCustomerGateway(CreateCustomerGatewayRequest createCustomerGatewayRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateCustomerGatewayRequestMarshaller().Marshall(createCustomerGatewayRequest); var unmarshaller = CreateCustomerGatewayResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Provides information to AWS about your VPN customer gateway device. The customer gateway is the appliance at your end of the VPN /// connection. (The device on the AWS side of the VPN connection is the virtual private gateway.) You must provide the Internet-routable IP /// address of the customer gateway's external interface. The IP address must be static and can't be behind a device performing network address /// translation (NAT).</para> <para>For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System /// Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN (in the /// 64512 - 65534 range).</para> <para><b>NOTE:</b> Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with the exception of /// 7224, which is reserved in the us-east-1 region, and 9059, which is reserved in the eu-west-1 region. </para> <para>For more information /// about VPN customer gateways, 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="createCustomerGatewayRequest">Container for the necessary parameters to execute the CreateCustomerGateway service method on /// AmazonEC2.</param> /// /// <returns>The response from the CreateCustomerGateway 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<CreateCustomerGatewayResponse> CreateCustomerGatewayAsync(CreateCustomerGatewayRequest createCustomerGatewayRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateCustomerGatewayRequestMarshaller(); var unmarshaller = CreateCustomerGatewayResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateCustomerGatewayRequest, CreateCustomerGatewayResponse>(createCustomerGatewayRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the CreateCustomerGateway operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.CreateCustomerGateway"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateCustomerGateway 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<CreateCustomerGatewayResponse> CreateCustomerGatewayAsync(CreateCustomerGatewayRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateCustomerGatewayRequestMarshaller(); var unmarshaller = CreateCustomerGatewayResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateCustomerGatewayRequest, CreateCustomerGatewayResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }