AWS SDK Version 2 for .NET
API Reference

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.

.NET Framework 3.5
Creates a customer master key. Customer master keys can be used to encrypt small amounts of data (less than 4K) directly, but they are most commonly used to encrypt or envelope data keys that are then used to encrypt customer data. For more information about data keys, see GenerateDataKey and GenerateDataKeyWithoutPlaintext.

Namespace: Amazon.KeyManagementService
Assembly: AWSSDK.dll
Version: (assembly version)


public abstract CreateKeyResponse CreateKey(
         CreateKeyRequest request


Type: Amazon.KeyManagementService.Model.CreateKeyRequest

Container for the necessary parameters to execute the CreateKey service method.

Return Value
Type: Amazon.KeyManagementService.Model.CreateKeyResponse
The response from the CreateKey service method, as returned by KeyManagementService.


DependencyTimeoutException The system timed out while trying to fulfill the request. The request can be retried.
InvalidArnException The request was rejected because a specified ARN was not valid.
KMSInternalException The request was rejected because an internal exception occurred. The request can be retried.
LimitExceededException The request was rejected because a limit was exceeded. For more information, see Limits in the AWS Key Management Service Developer Guide.
MalformedPolicyDocumentException The request was rejected because the specified policy is not syntactically or semantically correct.
UnsupportedOperationException The request was rejected because a specified parameter is not supported.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5