IAsyncResult invokeCopyDBSnapshot(CopyDBSnapshotRequest copyDBSnapshotRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CopyDBSnapshotRequestMarshaller().Marshall(copyDBSnapshotRequest); var unmarshaller = CopyDBSnapshotResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Copies the specified DBSnapshot. The source DB snapshot must be in the "available" /// state. /// /// /// <para> /// If you are copying from a shared manual DB snapshot, the <code>SourceDBSnapshotIdentifier</code> /// must be the ARN of the shared DB snapshot. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CopyDBSnapshot service method.</param> /// /// <returns>The response from the CopyDBSnapshot service method, as returned by RDS.</returns> /// <exception cref="Amazon.RDS.Model.DBSnapshotAlreadyExistsException"> /// <i>DBSnapshotIdentifier</i> is already used by an existing snapshot. /// </exception> /// <exception cref="Amazon.RDS.Model.DBSnapshotNotFoundException"> /// <i>DBSnapshotIdentifier</i> does not refer to an existing DB snapshot. /// </exception> /// <exception cref="Amazon.RDS.Model.InvalidDBSnapshotStateException"> /// The state of the DB snapshot does not allow deletion. /// </exception> /// <exception cref="Amazon.RDS.Model.SnapshotQuotaExceededException"> /// Request would result in user exceeding the allowed number of DB snapshots. /// </exception> public CopyDBSnapshotResponse CopyDBSnapshot(CopyDBSnapshotRequest request) { var marshaller = new CopyDBSnapshotRequestMarshaller(); var unmarshaller = CopyDBSnapshotResponseUnmarshaller.Instance; return Invoke<CopyDBSnapshotRequest,CopyDBSnapshotResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CopyDBSnapshot operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CopyDBSnapshot 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<CopyDBSnapshotResponse> CopyDBSnapshotAsync(CopyDBSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CopyDBSnapshotRequestMarshaller(); var unmarshaller = CopyDBSnapshotResponseUnmarshaller.Instance; return InvokeAsync<CopyDBSnapshotRequest,CopyDBSnapshotResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the CopyDBSnapshot operation. /// <seealso cref="Amazon.RDS.IAmazonRDS.CopyDBSnapshot"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CopyDBSnapshot 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<CopyDBSnapshotResponse> CopyDBSnapshotAsync(CopyDBSnapshotRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CopyDBSnapshotRequestMarshaller(); var unmarshaller = CopyDBSnapshotResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CopyDBSnapshotRequest, CopyDBSnapshotResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
public void CopyDBSnapshotMarshallTest() { var operation = service_model.FindOperation("CopyDBSnapshot"); var request = InstantiateClassGenerator.Execute<CopyDBSnapshotRequest>(); var marshaller = new CopyDBSnapshotRequestMarshaller(); 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 = CopyDBSnapshotResponseUnmarshaller.Instance.Unmarshall(context) as CopyDBSnapshotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// <para> Copies the specified DBSnapshot. The source DBSnapshot must be in the "available" state. </para> /// </summary> /// /// <param name="copyDBSnapshotRequest">Container for the necessary parameters to execute the CopyDBSnapshot service method on /// AmazonRDS.</param> /// /// <returns>The response from the CopyDBSnapshot service method, as returned by AmazonRDS.</returns> /// /// <exception cref="T:Amazon.RDS.Model.InvalidDBSnapshotStateException" /> /// <exception cref="T:Amazon.RDS.Model.SnapshotQuotaExceededException" /> /// <exception cref="T:Amazon.RDS.Model.DBSnapshotAlreadyExistsException" /> /// <exception cref="T:Amazon.RDS.Model.DBSnapshotNotFoundException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<CopyDBSnapshotResponse> CopyDBSnapshotAsync(CopyDBSnapshotRequest copyDBSnapshotRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CopyDBSnapshotRequestMarshaller(); var unmarshaller = CopyDBSnapshotResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CopyDBSnapshotRequest, CopyDBSnapshotResponse>(copyDBSnapshotRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// Initiates the asynchronous execution of the CopyDBSnapshot operation. /// <seealso cref="Amazon.RDS.IAmazonRDS"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CopyDBSnapshot operation on AmazonRDSClient.</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 EndCopyDBSnapshot /// operation.</returns> public IAsyncResult BeginCopyDBSnapshot(CopyDBSnapshotRequest request, AsyncCallback callback, object state) { var marshaller = new CopyDBSnapshotRequestMarshaller(); var unmarshaller = CopyDBSnapshotResponseUnmarshaller.Instance; return BeginInvoke<CopyDBSnapshotRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para> Copies the specified DBSnapshot. The source DBSnapshot must be in the "available" state. </para> /// </summary> /// /// <param name="copyDBSnapshotRequest">Container for the necessary parameters to execute the CopyDBSnapshot service method on /// AmazonRDS.</param> /// /// <returns>The response from the CopyDBSnapshot service method, as returned by AmazonRDS.</returns> /// /// <exception cref="InvalidDBSnapshotStateException"/> /// <exception cref="SnapshotQuotaExceededException"/> /// <exception cref="DBSnapshotAlreadyExistsException"/> /// <exception cref="DBSnapshotNotFoundException"/> public CopyDBSnapshotResponse CopyDBSnapshot(CopyDBSnapshotRequest copyDBSnapshotRequest) { IRequest<CopyDBSnapshotRequest> request = new CopyDBSnapshotRequestMarshaller().Marshall(copyDBSnapshotRequest); CopyDBSnapshotResponse response = Invoke<CopyDBSnapshotRequest, CopyDBSnapshotResponse> (request, this.signer, CopyDBSnapshotResponseUnmarshaller.GetInstance()); return response; }