/// <summary> /// Initiates the asynchronous execution of the DescribeSpotInstanceRequests operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeSpotInstanceRequests 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<DescribeSpotInstanceRequestsResponse> DescribeSpotInstanceRequestsAsync(DescribeSpotInstanceRequestsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeSpotInstanceRequestsRequestMarshaller(); var unmarshaller = DescribeSpotInstanceRequestsResponseUnmarshaller.Instance; return InvokeAsync<DescribeSpotInstanceRequestsRequest,DescribeSpotInstanceRequestsResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void DescribeSpotInstanceRequestsMarshallTest() { var operation = service_model.FindOperation("DescribeSpotInstanceRequests"); var request = InstantiateClassGenerator.Execute<DescribeSpotInstanceRequestsRequest>(); var marshaller = new DescribeSpotInstanceRequestsRequestMarshaller(); 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 = DescribeSpotInstanceRequestsResponseUnmarshaller.Instance.Unmarshall(context) as DescribeSpotInstanceRequestsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Describes the Spot Instance requests that belong to your account. Spot Instances are /// instances that Amazon EC2 launches when the bid price that you specify exceeds the /// current Spot Price. Amazon EC2 periodically sets the Spot Price based on available /// Spot Instance capacity and current Spot Instance requests. For more information, see /// <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html">Spot /// Instance Requests</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. /// /// /// <para> /// You can use <code>DescribeSpotInstanceRequests</code> to find a running Spot Instance /// by examining the response. If the status of the Spot Instance is <code>fulfilled</code>, /// the instance ID appears in the response and contains the identifier of the instance. /// Alternatively, you can use <a>DescribeInstances</a> with a filter to look for instances /// where the instance lifecycle is <code>spot</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeSpotInstanceRequests service method.</param> /// /// <returns>The response from the DescribeSpotInstanceRequests service method, as returned by EC2.</returns> public DescribeSpotInstanceRequestsResponse DescribeSpotInstanceRequests(DescribeSpotInstanceRequestsRequest request) { var marshaller = new DescribeSpotInstanceRequestsRequestMarshaller(); var unmarshaller = DescribeSpotInstanceRequestsResponseUnmarshaller.Instance; return Invoke<DescribeSpotInstanceRequestsRequest,DescribeSpotInstanceRequestsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DescribeSpotInstanceRequests operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeSpotInstanceRequests 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 EndDescribeSpotInstanceRequests /// operation.</returns> public IAsyncResult BeginDescribeSpotInstanceRequests(DescribeSpotInstanceRequestsRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeSpotInstanceRequestsRequestMarshaller(); var unmarshaller = DescribeSpotInstanceRequestsResponseUnmarshaller.Instance; return BeginInvoke<DescribeSpotInstanceRequestsRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeDescribeSpotInstanceRequests(DescribeSpotInstanceRequestsRequest describeSpotInstanceRequestsRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeSpotInstanceRequestsRequestMarshaller().Marshall(describeSpotInstanceRequestsRequest); var unmarshaller = DescribeSpotInstanceRequestsResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Describes the Spot Instance requests that belong to your account. Spot Instances are instances that Amazon EC2 starts on your behalf /// when the maximum price that you specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on available Spot /// Instance capacity and current Spot Instance requests. For more information about Spot Instances, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html">Spot Instances</a> in the <i>Amazon Elastic Compute /// Cloud User Guide</i> .</para> <para>You can use <c>DescribeSpotInstanceRequests</c> to find a running Spot Instance by examining the /// response. If the status of the Spot Instance is <c>fulfilled</c> , the instance ID appears in the response and contains the identifier of /// the instance. Alternatively, you can use DescribeInstances with a filter to look for instances where the instance lifecycle is <c>spot</c> /// .</para> /// </summary> /// /// <param name="describeSpotInstanceRequestsRequest">Container for the necessary parameters to execute the DescribeSpotInstanceRequests service /// method on AmazonEC2.</param> /// /// <returns>The response from the DescribeSpotInstanceRequests 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<DescribeSpotInstanceRequestsResponse> DescribeSpotInstanceRequestsAsync(DescribeSpotInstanceRequestsRequest describeSpotInstanceRequestsRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeSpotInstanceRequestsRequestMarshaller(); var unmarshaller = DescribeSpotInstanceRequestsResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeSpotInstanceRequestsRequest, DescribeSpotInstanceRequestsResponse>(describeSpotInstanceRequestsRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DescribeSpotInstanceRequests operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.DescribeSpotInstanceRequests"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeSpotInstanceRequests 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<DescribeSpotInstanceRequestsResponse> DescribeSpotInstanceRequestsAsync(DescribeSpotInstanceRequestsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeSpotInstanceRequestsRequestMarshaller(); var unmarshaller = DescribeSpotInstanceRequestsResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeSpotInstanceRequestsRequest, DescribeSpotInstanceRequestsResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }