/// <summary> /// Initiates the asynchronous execution of the CreateSnapshotCopyGrant operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateSnapshotCopyGrant operation on AmazonRedshiftClient.</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 EndCreateSnapshotCopyGrant /// operation.</returns> public IAsyncResult BeginCreateSnapshotCopyGrant(CreateSnapshotCopyGrantRequest request, AsyncCallback callback, object state) { var marshaller = new CreateSnapshotCopyGrantRequestMarshaller(); var unmarshaller = CreateSnapshotCopyGrantResponseUnmarshaller.Instance; return BeginInvoke<CreateSnapshotCopyGrantRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the CreateSnapshotCopyGrant operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateSnapshotCopyGrant 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<CreateSnapshotCopyGrantResponse> CreateSnapshotCopyGrantAsync(CreateSnapshotCopyGrantRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateSnapshotCopyGrantRequestMarshaller(); var unmarshaller = CreateSnapshotCopyGrantResponseUnmarshaller.Instance; return InvokeAsync<CreateSnapshotCopyGrantRequest,CreateSnapshotCopyGrantResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Creates a snapshot copy grant that permits Amazon Redshift to use a customer master /// key (CMK) from AWS Key Management Service (AWS KMS) to encrypt copied snapshots in /// a destination region. /// /// /// <para> /// For more information about managing snapshot copy grants, go to <a href="http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html">Amazon /// Redshift Database Encryption</a> in the <i>Amazon Redshift Cluster Management Guide</i>. /// /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateSnapshotCopyGrant service method.</param> /// /// <returns>The response from the CreateSnapshotCopyGrant service method, as returned by Redshift.</returns> /// <exception cref="Amazon.Redshift.Model.InvalidTagException"> /// The tag is invalid. /// </exception> /// <exception cref="Amazon.Redshift.Model.LimitExceededException"> /// The encryption key has exceeded its grant limit in AWS KMS. /// </exception> /// <exception cref="Amazon.Redshift.Model.SnapshotCopyGrantAlreadyExistsException"> /// The snapshot copy grant can't be created because a grant with the same name already /// exists. /// </exception> /// <exception cref="Amazon.Redshift.Model.SnapshotCopyGrantQuotaExceededException"> /// The AWS account has exceeded the maximum number of snapshot copy grants in this region. /// </exception> /// <exception cref="Amazon.Redshift.Model.TagLimitExceededException"> /// The request exceeds the limit of 10 tags for the resource. /// </exception> public CreateSnapshotCopyGrantResponse CreateSnapshotCopyGrant(CreateSnapshotCopyGrantRequest request) { var marshaller = new CreateSnapshotCopyGrantRequestMarshaller(); var unmarshaller = CreateSnapshotCopyGrantResponseUnmarshaller.Instance; return Invoke<CreateSnapshotCopyGrantRequest,CreateSnapshotCopyGrantResponse>(request, marshaller, unmarshaller); }
public void CreateSnapshotCopyGrantMarshallTest() { var operation = service_model.FindOperation("CreateSnapshotCopyGrant"); var request = InstantiateClassGenerator.Execute<CreateSnapshotCopyGrantRequest>(); var marshaller = new CreateSnapshotCopyGrantRequestMarshaller(); 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 = CreateSnapshotCopyGrantResponseUnmarshaller.Instance.Unmarshall(context) as CreateSnapshotCopyGrantResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }