AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
This is the response object from the GenerateDataKeyWithoutPlaintext operation.
Namespace: Amazon.KeyManagementService.Model
Assembly: AWSSDK.KeyManagementService.dll
Version: 3.x.y.z
public class GenerateDataKeyWithoutPlaintextResponse : AmazonWebServiceResponse
The GenerateDataKeyWithoutPlaintextResponse type exposes the following members
Name | Description | |
---|---|---|
GenerateDataKeyWithoutPlaintextResponse() |
Name | Type | Description | |
---|---|---|---|
CiphertextBlob | System.IO.MemoryStream |
Gets and sets the property CiphertextBlob. The encrypted data key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. |
|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
KeyId | System.String |
Gets and sets the property KeyId. The Amazon Resource Name (key ARN) of the KMS key that encrypted the data key. |
|
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
The following example generates an encrypted copy of a 256-bit symmetric data encryption key (data key). The data key is encrypted with the specified KMS key.
var client = new AmazonKeyManagementServiceClient(); var response = client.GenerateDataKeyWithoutPlaintext(new GenerateDataKeyWithoutPlaintextRequest { KeyId = "alias/ExampleAlias", // The identifier of the KMS key to use to encrypt the data key. You can use the key ID or Amazon Resource Name (ARN) of the KMS key, or the name or ARN of an alias that refers to the KMS key. KeySpec = "AES_256" // Specifies the type of data key to return. }); MemoryStream ciphertextBlob = response.CiphertextBlob; // The encrypted data key. string keyId = response.KeyId; // The ARN of the KMS key that was used to encrypt the data key.
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5