/// <summary> /// Initiates the asynchronous execution of the BundleInstance operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the BundleInstance 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<BundleInstanceResponse> BundleInstanceAsync(BundleInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new BundleInstanceRequestMarshaller(); var unmarshaller = BundleInstanceResponseUnmarshaller.Instance; return InvokeAsync<BundleInstanceRequest,BundleInstanceResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void BundleInstanceMarshallTest() { var operation = service_model.FindOperation("BundleInstance"); var request = InstantiateClassGenerator.Execute<BundleInstanceRequest>(); var marshaller = new BundleInstanceRequestMarshaller(); 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 = BundleInstanceResponseUnmarshaller.Instance.Unmarshall(context) as BundleInstanceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Bundles an Amazon instance store-backed Windows instance. /// /// /// <para> /// During bundling, only the root device volume (C:\) is bundled. Data on other instance /// store volumes is not preserved. /// </para> /// <note> /// <para> /// This action is not applicable for Linux/Unix instances or Windows instances that are /// backed by Amazon EBS. /// </para> /// </note> /// <para> /// For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_InstanceStoreBacked_WinAMI.html">Creating /// an Instance Store-Backed Windows AMI</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the BundleInstance service method.</param> /// /// <returns>The response from the BundleInstance service method, as returned by EC2.</returns> public BundleInstanceResponse BundleInstance(BundleInstanceRequest request) { var marshaller = new BundleInstanceRequestMarshaller(); var unmarshaller = BundleInstanceResponseUnmarshaller.Instance; return Invoke<BundleInstanceRequest,BundleInstanceResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the BundleInstance operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the BundleInstance 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 EndBundleInstance /// operation.</returns> public IAsyncResult BeginBundleInstance(BundleInstanceRequest request, AsyncCallback callback, object state) { var marshaller = new BundleInstanceRequestMarshaller(); var unmarshaller = BundleInstanceResponseUnmarshaller.Instance; return BeginInvoke<BundleInstanceRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeBundleInstance(BundleInstanceRequest bundleInstanceRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new BundleInstanceRequestMarshaller().Marshall(bundleInstanceRequest); var unmarshaller = BundleInstanceResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Bundles an Amazon instance store-backed Windows instance.</para> <para>During bundling, only the root device volume (C:\) is bundled. /// Data on other instance store volumes is not preserved.</para> <para><b>NOTE:</b> This procedure is not applicable for Linux/Unix instances /// or Windows instances that are backed by Amazon EBS. </para> <para>For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_InstanceStoreBacked_WinAMI.html">Creating an Instance Store-Backed /// Windows AMI</a> .</para> /// </summary> /// /// <param name="bundleInstanceRequest">Container for the necessary parameters to execute the BundleInstance service method on /// AmazonEC2.</param> /// /// <returns>The response from the BundleInstance 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<BundleInstanceResponse> BundleInstanceAsync(BundleInstanceRequest bundleInstanceRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new BundleInstanceRequestMarshaller(); var unmarshaller = BundleInstanceResponseUnmarshaller.GetInstance(); return Invoke<IRequest, BundleInstanceRequest, BundleInstanceResponse>(bundleInstanceRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the BundleInstance operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.BundleInstance"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the BundleInstance 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<BundleInstanceResponse> BundleInstanceAsync(BundleInstanceRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new BundleInstanceRequestMarshaller(); var unmarshaller = BundleInstanceResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, BundleInstanceRequest, BundleInstanceResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }