/// <summary> /// Initiates the asynchronous execution of the DescribeRegions operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeRegions 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<DescribeRegionsResponse> DescribeRegionsAsync(DescribeRegionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeRegionsRequestMarshaller(); var unmarshaller = DescribeRegionsResponseUnmarshaller.Instance; return InvokeAsync<DescribeRegionsRequest,DescribeRegionsResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void DescribeRegionsMarshallTest() { var operation = service_model.FindOperation("DescribeRegions"); var request = InstantiateClassGenerator.Execute<DescribeRegionsRequest>(); var marshaller = new DescribeRegionsRequestMarshaller(); 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 = DescribeRegionsResponseUnmarshaller.Instance.Unmarshall(context) as DescribeRegionsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Describes one or more regions that are currently available to you. /// /// /// <para> /// For a list of the regions supported by Amazon EC2, see <a href="http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region">Regions /// and Endpoints</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeRegions service method.</param> /// /// <returns>The response from the DescribeRegions service method, as returned by EC2.</returns> public DescribeRegionsResponse DescribeRegions(DescribeRegionsRequest request) { var marshaller = new DescribeRegionsRequestMarshaller(); var unmarshaller = DescribeRegionsResponseUnmarshaller.Instance; return Invoke<DescribeRegionsRequest,DescribeRegionsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DescribeRegions operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeRegions 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 EndDescribeRegions /// operation.</returns> public IAsyncResult BeginDescribeRegions(DescribeRegionsRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeRegionsRequestMarshaller(); var unmarshaller = DescribeRegionsResponseUnmarshaller.Instance; return BeginInvoke<DescribeRegionsRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeDescribeRegions(DescribeRegionsRequest describeRegionsRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeRegionsRequestMarshaller().Marshall(describeRegionsRequest); var unmarshaller = DescribeRegionsResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Describes one or more regions that are currently available to you.</para> <para>For a list of the regions supported by Amazon EC2, see /// <a href="http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region">Regions and Endpoints</a> .</para> /// </summary> /// /// <param name="describeRegionsRequest">Container for the necessary parameters to execute the DescribeRegions service method on /// AmazonEC2.</param> /// /// <returns>The response from the DescribeRegions 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<DescribeRegionsResponse> DescribeRegionsAsync(DescribeRegionsRequest describeRegionsRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeRegionsRequestMarshaller(); var unmarshaller = DescribeRegionsResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeRegionsRequest, DescribeRegionsResponse>(describeRegionsRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DescribeRegions operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.DescribeRegions"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeRegions 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<DescribeRegionsResponse> DescribeRegionsAsync(DescribeRegionsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeRegionsRequestMarshaller(); var unmarshaller = DescribeRegionsResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeRegionsRequest, DescribeRegionsResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }