internal DeleteSnapshotResponse DeleteSnapshot(DeleteSnapshotRequest request) { var marshaller = new DeleteSnapshotRequestMarshaller(); var unmarshaller = DeleteSnapshotResponseUnmarshaller.Instance; return(Invoke <DeleteSnapshotRequest, DeleteSnapshotResponse>(request, marshaller, unmarshaller)); }
public void DeleteSnapshotMarshallTest() { var request = InstantiateClassGenerator.Execute <DeleteSnapshotRequest>(); var marshaller = new DeleteSnapshotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <DeleteSnapshotRequest>(request, jsonRequest); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("DeleteSnapshot").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = DeleteSnapshotResponseUnmarshaller.Instance.Unmarshall(context) as DeleteSnapshotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the DeleteSnapshot operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteSnapshot 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 <DeleteSnapshotResponse> DeleteSnapshotAsync(DeleteSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteSnapshotRequestMarshaller(); var unmarshaller = DeleteSnapshotResponseUnmarshaller.Instance; return(InvokeAsync <DeleteSnapshotRequest, DeleteSnapshotResponse>(request, marshaller, unmarshaller, cancellationToken)); }
public void DeleteSnapshotMarshallTest() { var operation = service_model.FindOperation("DeleteSnapshot"); var request = InstantiateClassGenerator.Execute <DeleteSnapshotRequest>(); var marshaller = new DeleteSnapshotRequestMarshaller(); 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(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = DeleteSnapshotResponseUnmarshaller.Instance.Unmarshall(context) as DeleteSnapshotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void DeleteSnapshotMarshallTest() { var operation = service_model.FindOperation("DeleteSnapshot"); var request = InstantiateClassGenerator.Execute<DeleteSnapshotRequest>(); var marshaller = new DeleteSnapshotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); }
/// <summary> /// Initiates the asynchronous execution of the DeleteSnapshot operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteSnapshot 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<DeleteSnapshotResponse> DeleteSnapshotAsync(DeleteSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteSnapshotRequestMarshaller(); var unmarshaller = DeleteSnapshotResponseUnmarshaller.Instance; return InvokeAsync<DeleteSnapshotRequest,DeleteSnapshotResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Deletes the specified snapshot. /// /// /// <para> /// When you make periodic snapshots of a volume, the snapshots are incremental, and only /// the blocks on the device that have changed since your last snapshot are saved in the /// new snapshot. When you delete a snapshot, only the data not needed for any other snapshot /// is removed. So regardless of which prior snapshots have been deleted, all active snapshots /// will have access to all the information needed to restore the volume. /// </para> /// /// <para> /// You cannot delete a snapshot of the root device of an EBS volume used by a registered /// AMI. You must first de-register the AMI before you can delete the snapshot. /// </para> /// /// <para> /// For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html">Deleting /// an Amazon EBS Snapshot</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteSnapshot service method.</param> /// /// <returns>The response from the DeleteSnapshot service method, as returned by EC2.</returns> public DeleteSnapshotResponse DeleteSnapshot(DeleteSnapshotRequest request) { var marshaller = new DeleteSnapshotRequestMarshaller(); var unmarshaller = DeleteSnapshotResponseUnmarshaller.Instance; return Invoke<DeleteSnapshotRequest,DeleteSnapshotResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DeleteSnapshot operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteSnapshot 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 EndDeleteSnapshot /// operation.</returns> public IAsyncResult BeginDeleteSnapshot(DeleteSnapshotRequest request, AsyncCallback callback, object state) { var marshaller = new DeleteSnapshotRequestMarshaller(); var unmarshaller = DeleteSnapshotResponseUnmarshaller.Instance; return BeginInvoke<DeleteSnapshotRequest>(request, marshaller, unmarshaller, callback, state); }
public void DeleteSnapshotMarshallTest() { var request = InstantiateClassGenerator.Execute<DeleteSnapshotRequest>(); var marshaller = new DeleteSnapshotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<DeleteSnapshotRequest>(request,jsonRequest); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("DeleteSnapshot").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = DeleteSnapshotResponseUnmarshaller.Instance.Unmarshall(context) as DeleteSnapshotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
IAsyncResult invokeDeleteSnapshot(DeleteSnapshotRequest deleteSnapshotRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeleteSnapshotRequestMarshaller().Marshall(deleteSnapshotRequest); var unmarshaller = DeleteSnapshotResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Deletes the specified snapshot.</para> <para>When you make periodic snapshots of a volume, the snapshots are incremental, and only the /// blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not /// needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to /// all the information needed to restore the volume.</para> <para>You cannot delete a snapshot of the root device of an Amazon EBS volume used /// by a registered AMI. You must first de-register the AMI before you can delete the snapshot.</para> <para>For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html">Deleting an Amazon EBS Snapshot</a> in the <i>Amazon /// Elastic Compute Cloud User Guide</i> .</para> /// </summary> /// /// <param name="deleteSnapshotRequest">Container for the necessary parameters to execute the DeleteSnapshot service method on /// AmazonEC2.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<DeleteSnapshotResponse> DeleteSnapshotAsync(DeleteSnapshotRequest deleteSnapshotRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteSnapshotRequestMarshaller(); var unmarshaller = DeleteSnapshotResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeleteSnapshotRequest, DeleteSnapshotResponse>(deleteSnapshotRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DeleteSnapshot operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.DeleteSnapshot"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteSnapshot 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<DeleteSnapshotResponse> DeleteSnapshotAsync(DeleteSnapshotRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteSnapshotRequestMarshaller(); var unmarshaller = DeleteSnapshotResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeleteSnapshotRequest, DeleteSnapshotResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
public void DeleteSnapshotMarshallTest() { var operation = service_model.FindOperation("DeleteSnapshot"); var request = InstantiateClassGenerator.Execute<DeleteSnapshotRequest>(); var marshaller = new DeleteSnapshotRequestMarshaller(); 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(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = DeleteSnapshotResponseUnmarshaller.Instance.Unmarshall(context) as DeleteSnapshotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }