/// <summary> /// Initiates the asynchronous execution of the CreateReservedInstancesListing operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateReservedInstancesListing 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<CreateReservedInstancesListingResponse> CreateReservedInstancesListingAsync(CreateReservedInstancesListingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateReservedInstancesListingRequestMarshaller(); var unmarshaller = CreateReservedInstancesListingResponseUnmarshaller.Instance; return InvokeAsync<CreateReservedInstancesListingRequest,CreateReservedInstancesListingResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void CreateReservedInstancesListingMarshallTest() { var operation = service_model.FindOperation("CreateReservedInstancesListing"); var request = InstantiateClassGenerator.Execute<CreateReservedInstancesListingRequest>(); var marshaller = new CreateReservedInstancesListingRequestMarshaller(); 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 = CreateReservedInstancesListingResponseUnmarshaller.Instance.Unmarshall(context) as CreateReservedInstancesListingResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Creates a listing for Amazon EC2 Reserved Instances to be sold in the Reserved Instance /// Marketplace. You can submit one Reserved Instance listing at a time. To get a list /// of your Reserved Instances, you can use the <a>DescribeReservedInstances</a> operation. /// /// /// <para> /// The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance /// capacity that they no longer need with buyers who want to purchase additional capacity. /// Reserved Instances bought and sold through the Reserved Instance Marketplace work /// like any other Reserved Instances. /// </para> /// /// <para> /// To sell your Reserved Instances, you must first register as a seller in the Reserved /// Instance Marketplace. After completing the registration process, you can create a /// Reserved Instance Marketplace listing of some or all of your Reserved Instances, and /// specify the upfront price to receive for them. Your Reserved Instance listings then /// become available for purchase. To view the details of your Reserved Instance listing, /// you can use the <a>DescribeReservedInstancesListings</a> operation. /// </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="request">Container for the necessary parameters to execute the CreateReservedInstancesListing service method.</param> /// /// <returns>The response from the CreateReservedInstancesListing service method, as returned by EC2.</returns> public CreateReservedInstancesListingResponse CreateReservedInstancesListing(CreateReservedInstancesListingRequest request) { var marshaller = new CreateReservedInstancesListingRequestMarshaller(); var unmarshaller = CreateReservedInstancesListingResponseUnmarshaller.Instance; return Invoke<CreateReservedInstancesListingRequest,CreateReservedInstancesListingResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateReservedInstancesListing operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateReservedInstancesListing 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 EndCreateReservedInstancesListing /// operation.</returns> public IAsyncResult BeginCreateReservedInstancesListing(CreateReservedInstancesListingRequest request, AsyncCallback callback, object state) { var marshaller = new CreateReservedInstancesListingRequestMarshaller(); var unmarshaller = CreateReservedInstancesListingResponseUnmarshaller.Instance; return BeginInvoke<CreateReservedInstancesListingRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeCreateReservedInstancesListing(CreateReservedInstancesListingRequest createReservedInstancesListingRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateReservedInstancesListingRequestMarshaller().Marshall(createReservedInstancesListingRequest); var unmarshaller = CreateReservedInstancesListingResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Creates a listing for Amazon EC2 Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Reserved /// Instance listing at a time.</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="createReservedInstancesListingRequest">Container for the necessary parameters to execute the CreateReservedInstancesListing /// service method on AmazonEC2.</param> /// /// <returns>The response from the CreateReservedInstancesListing 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<CreateReservedInstancesListingResponse> CreateReservedInstancesListingAsync(CreateReservedInstancesListingRequest createReservedInstancesListingRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateReservedInstancesListingRequestMarshaller(); var unmarshaller = CreateReservedInstancesListingResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateReservedInstancesListingRequest, CreateReservedInstancesListingResponse>(createReservedInstancesListingRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the CreateReservedInstancesListing operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.CreateReservedInstancesListing"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateReservedInstancesListing 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<CreateReservedInstancesListingResponse> CreateReservedInstancesListingAsync(CreateReservedInstancesListingRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateReservedInstancesListingRequestMarshaller(); var unmarshaller = CreateReservedInstancesListingResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateReservedInstancesListingRequest, CreateReservedInstancesListingResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }