AWS SDK Version 3 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.

This is the response object from the CreateCustomKeyStore operation.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.KeyManagementService.Model.CreateCustomKeyStoreResponse

Namespace: Amazon.KeyManagementService.Model
Assembly: AWSSDK.KeyManagementService.dll
Version: 3.x.y.z

Syntax

C#
public class CreateCustomKeyStoreResponse : AmazonWebServiceResponse

The CreateCustomKeyStoreResponse type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property CustomKeyStoreId System.String

Gets and sets the property CustomKeyStoreId.

A unique identifier for the new custom key store.

Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.

Examples

This example creates a custom key store that is associated with an AWS CloudHSM cluster.

To create an AWS CloudHSM key store


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.

To create an external key store with VPC endpoint service connectivity


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.

To create 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.

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

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