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 CreateCustomKeyStore operation.
Namespace: Amazon.KeyManagementService.Model
Assembly: AWSSDK.KeyManagementService.dll
Version: 3.x.y.z
public class CreateCustomKeyStoreResponse : AmazonWebServiceResponse
The CreateCustomKeyStoreResponse type exposes the following members
Name | Description | |
---|---|---|
CreateCustomKeyStoreResponse() |
Name | Type | Description | |
---|---|---|---|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
CustomKeyStoreId | System.String |
Gets and sets the property CustomKeyStoreId. A unique identifier for the new custom key store. |
|
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
This example creates a custom key store that is associated with an AWS CloudHSM cluster.
var client = new AmazonKeyManagementServiceClient(); var response = client.CreateCustomKeyStore(new CreateCustomKeyStoreRequest { CloudHsmClusterId = "cluster-234abcdefABC", // The ID of the CloudHSM cluster. CustomKeyStoreName = "ExampleKeyStore", // A friendly name for the custom key store. KeyStorePassword = "kmsPswd", // The password for the kmsuser CU account in the specified cluster. TrustAnchorCertificate = "<certificate-goes-here>" // The content of the customerCA.crt file that you created when you initialized the cluster. }); string customKeyStoreId = response.CustomKeyStoreId; // The ID of the new custom key store.
This example creates an external key store that uses an Amazon VPC endpoint service to communicate with AWS KMS.
var client = new AmazonKeyManagementServiceClient(); var response = client.CreateCustomKeyStore(new CreateCustomKeyStoreRequest { CustomKeyStoreName = "ExampleVPCEndpointKeyStore", // A friendly name for the custom key store CustomKeyStoreType = "EXTERNAL_KEY_STORE", // For external key stores, the value must be EXTERNAL_KEY_STORE XksProxyAuthenticationCredential = new XksProxyAuthenticationCredentialType { AccessKeyId = "ABCDE12345670EXAMPLE", RawSecretAccessKey = "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo=" }, // The access key ID and secret access key that KMS uses to authenticate to your external key store proxy XksProxyConnectivity = "VPC_ENDPOINT_SERVICE", // Indicates how AWS KMS communicates with the external key store proxy XksProxyUriEndpoint = "https://myproxy-private.xks.example.com", // The URI that AWS KMS uses to connect to the external key store proxy XksProxyUriPath = "/example-prefix/kms/xks/v1", // The URI path to the external key store proxy APIs XksProxyVpcEndpointServiceName = "com.amazonaws.vpce.us-east-1.vpce-svc-example1" // The VPC endpoint service that KMS uses to communicate with the external key store proxy }); string customKeyStoreId = response.CustomKeyStoreId; // The ID of the new custom key store.
This example creates an external key store with public endpoint connectivity.
var client = new AmazonKeyManagementServiceClient(); var response = client.CreateCustomKeyStore(new CreateCustomKeyStoreRequest { CustomKeyStoreName = "ExamplePublicEndpointKeyStore", // A friendly name for the custom key store CustomKeyStoreType = "EXTERNAL_KEY_STORE", // For external key stores, the value must be EXTERNAL_KEY_STORE XksProxyAuthenticationCredential = new XksProxyAuthenticationCredentialType { AccessKeyId = "ABCDE12345670EXAMPLE", RawSecretAccessKey = "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo=" }, // The access key ID and secret access key that KMS uses to authenticate to your external key store proxy XksProxyConnectivity = "PUBLIC_ENDPOINT", // Indicates how AWS KMS communicates with the external key store proxy XksProxyUriEndpoint = "https://myproxy.xks.example.com", // The URI that AWS KMS uses to connect to the external key store proxy XksProxyUriPath = "/kms/xks/v1" // The URI path to your external key store proxy API }); string customKeyStoreId = response.CustomKeyStoreId; // The ID of the new custom key store.
.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