/// <summary> /// Initiates the asynchronous execution of the DescribeReservedInstancesOfferings operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeReservedInstancesOfferings 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<DescribeReservedInstancesOfferingsResponse> DescribeReservedInstancesOfferingsAsync(DescribeReservedInstancesOfferingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeReservedInstancesOfferingsRequestMarshaller(); var unmarshaller = DescribeReservedInstancesOfferingsResponseUnmarshaller.Instance; return InvokeAsync<DescribeReservedInstancesOfferingsRequest,DescribeReservedInstancesOfferingsResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void DescribeReservedInstancesOfferingsMarshallTest() { var operation = service_model.FindOperation("DescribeReservedInstancesOfferings"); var request = InstantiateClassGenerator.Execute<DescribeReservedInstancesOfferingsRequest>(); var marshaller = new DescribeReservedInstancesOfferingsRequestMarshaller(); 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 = DescribeReservedInstancesOfferingsResponseUnmarshaller.Instance.Unmarshall(context) as DescribeReservedInstancesOfferingsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Describes Reserved Instance offerings that are available for purchase. With Reserved /// Instances, you purchase the right to launch instances for a period of time. During /// that time period, you do not receive insufficient capacity errors, and you pay a lower /// usage rate than the rate charged for On-Demand instances for the actual time used. /// /// /// <para> /// For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved /// Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeReservedInstancesOfferings service method.</param> /// /// <returns>The response from the DescribeReservedInstancesOfferings service method, as returned by EC2.</returns> public DescribeReservedInstancesOfferingsResponse DescribeReservedInstancesOfferings(DescribeReservedInstancesOfferingsRequest request) { var marshaller = new DescribeReservedInstancesOfferingsRequestMarshaller(); var unmarshaller = DescribeReservedInstancesOfferingsResponseUnmarshaller.Instance; return Invoke<DescribeReservedInstancesOfferingsRequest,DescribeReservedInstancesOfferingsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DescribeReservedInstancesOfferings operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeReservedInstancesOfferings 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 EndDescribeReservedInstancesOfferings /// operation.</returns> public IAsyncResult BeginDescribeReservedInstancesOfferings(DescribeReservedInstancesOfferingsRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeReservedInstancesOfferingsRequestMarshaller(); var unmarshaller = DescribeReservedInstancesOfferingsResponseUnmarshaller.Instance; return BeginInvoke<DescribeReservedInstancesOfferingsRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeDescribeReservedInstancesOfferings(DescribeReservedInstancesOfferingsRequest describeReservedInstancesOfferingsRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeReservedInstancesOfferingsRequestMarshaller().Marshall(describeReservedInstancesOfferingsRequest); var unmarshaller = DescribeReservedInstancesOfferingsResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch /// instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate /// than the rate charged for On-Demand instances for the actual time used.</para> <para>For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved Instance Marketplace</a> in the <i>Amazon Elastic /// Compute Cloud User Guide</i> .</para> /// </summary> /// /// <param name="describeReservedInstancesOfferingsRequest">Container for the necessary parameters to execute the /// DescribeReservedInstancesOfferings service method on AmazonEC2.</param> /// /// <returns>The response from the DescribeReservedInstancesOfferings 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<DescribeReservedInstancesOfferingsResponse> DescribeReservedInstancesOfferingsAsync(DescribeReservedInstancesOfferingsRequest describeReservedInstancesOfferingsRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeReservedInstancesOfferingsRequestMarshaller(); var unmarshaller = DescribeReservedInstancesOfferingsResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeReservedInstancesOfferingsRequest, DescribeReservedInstancesOfferingsResponse>(describeReservedInstancesOfferingsRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DescribeReservedInstancesOfferings operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.DescribeReservedInstancesOfferings"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeReservedInstancesOfferings 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<DescribeReservedInstancesOfferingsResponse> DescribeReservedInstancesOfferingsAsync(DescribeReservedInstancesOfferingsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeReservedInstancesOfferingsRequestMarshaller(); var unmarshaller = DescribeReservedInstancesOfferingsResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeReservedInstancesOfferingsRequest, DescribeReservedInstancesOfferingsResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }