Back to godoc.org

Package kms

v1.34.27
Latest Go to latest

The latest major version is .

Published: 1 day ago | License: Apache-2.0 | Module: github.com/aws/aws-sdk-go

Overview

Package kms provides the client and types for making API requests to AWS Key Management Service.

AWS Key Management Service (AWS KMS) is an encryption and key management web service. This guide describes the AWS KMS operations that you can call programmatically. For general information about AWS KMS, see the AWS Key Management Service Developer Guide (https://docs.aws.amazon.com/kms/latest/developerguide/).

AWS provides SDKs that consist of libraries and sample code for various programming languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs provide a convenient way to create programmatic access to AWS KMS and other AWS services. For example, the SDKs take care of tasks such as signing requests (see below), managing errors, and retrying requests automatically. For more information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/).

We recommend that you use the AWS SDKs to make programmatic API calls to AWS KMS.

Clients must support TLS (Transport Layer Security) 1.0. We recommend TLS 1.2. Clients must also support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems such as Java 7 and later support these modes.

Signing Requests

Requests must be signed by using an access key ID and a secret access key. We strongly recommend that you do not use your AWS account (root) access key ID and secret key for everyday work with AWS KMS. Instead, use the access key ID and secret access key for an IAM user. You can also use the AWS Security Token Service to generate temporary security credentials that you can use to sign requests.

All AWS KMS operations require Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).

Logging API Requests

AWS KMS supports AWS CloudTrail, a service that logs AWS API calls and related events for your AWS account and delivers them to an Amazon S3 bucket that you specify. By using the information collected by CloudTrail, you can determine what requests were made to AWS KMS, who made the request, when it was made, and so on. To learn more about CloudTrail, including how to turn it on and find your log files, see the AWS CloudTrail User Guide (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/).

Additional Resources

For more information about credentials and request signing, see the following:

* AWS Security Credentials (https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)
- This topic provides general information about the types of credentials
used for accessing AWS.

* Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
- This section of the IAM User Guide describes how to create and use temporary
security credentials.

* Signature Version 4 Signing Process (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)
- This set of topics walks you through the process of signing a request
using an access key ID and a secret access key.

Commonly Used API Operations

Of the API operations discussed in this guide, the following will prove the most useful for most applications. You will likely perform operations other than these, such as creating keys and assigning policies, by using the console.

* Encrypt

* Decrypt

* GenerateDataKey

* GenerateDataKeyWithoutPlaintext

See https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01 for more information on this service.

See kms package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/kms/

Using the Client

To contact AWS Key Management Service with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the AWS Key Management Service client KMS for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/kms/#New

Index

Examples

Constants

const (
	// AlgorithmSpecRsaesPkcs1V15 is a AlgorithmSpec enum value
	AlgorithmSpecRsaesPkcs1V15 = "RSAES_PKCS1_V1_5"

	// AlgorithmSpecRsaesOaepSha1 is a AlgorithmSpec enum value
	AlgorithmSpecRsaesOaepSha1 = "RSAES_OAEP_SHA_1"

	// AlgorithmSpecRsaesOaepSha256 is a AlgorithmSpec enum value
	AlgorithmSpecRsaesOaepSha256 = "RSAES_OAEP_SHA_256"
)
const (
	// ConnectionErrorCodeTypeInvalidCredentials is a ConnectionErrorCodeType enum value
	ConnectionErrorCodeTypeInvalidCredentials = "INVALID_CREDENTIALS"

	// ConnectionErrorCodeTypeClusterNotFound is a ConnectionErrorCodeType enum value
	ConnectionErrorCodeTypeClusterNotFound = "CLUSTER_NOT_FOUND"

	// ConnectionErrorCodeTypeNetworkErrors is a ConnectionErrorCodeType enum value
	ConnectionErrorCodeTypeNetworkErrors = "NETWORK_ERRORS"

	// ConnectionErrorCodeTypeInternalError is a ConnectionErrorCodeType enum value
	ConnectionErrorCodeTypeInternalError = "INTERNAL_ERROR"

	// ConnectionErrorCodeTypeInsufficientCloudhsmHsms is a ConnectionErrorCodeType enum value
	ConnectionErrorCodeTypeInsufficientCloudhsmHsms = "INSUFFICIENT_CLOUDHSM_HSMS"

	// ConnectionErrorCodeTypeUserLockedOut is a ConnectionErrorCodeType enum value
	ConnectionErrorCodeTypeUserLockedOut = "USER_LOCKED_OUT"

	// ConnectionErrorCodeTypeUserNotFound is a ConnectionErrorCodeType enum value
	ConnectionErrorCodeTypeUserNotFound = "USER_NOT_FOUND"

	// ConnectionErrorCodeTypeUserLoggedIn is a ConnectionErrorCodeType enum value
	ConnectionErrorCodeTypeUserLoggedIn = "USER_LOGGED_IN"

	// ConnectionErrorCodeTypeSubnetNotFound is a ConnectionErrorCodeType enum value
	ConnectionErrorCodeTypeSubnetNotFound = "SUBNET_NOT_FOUND"
)
const (
	// ConnectionStateTypeConnected is a ConnectionStateType enum value
	ConnectionStateTypeConnected = "CONNECTED"

	// ConnectionStateTypeConnecting is a ConnectionStateType enum value
	ConnectionStateTypeConnecting = "CONNECTING"

	// ConnectionStateTypeFailed is a ConnectionStateType enum value
	ConnectionStateTypeFailed = "FAILED"

	// ConnectionStateTypeDisconnected is a ConnectionStateType enum value
	ConnectionStateTypeDisconnected = "DISCONNECTED"

	// ConnectionStateTypeDisconnecting is a ConnectionStateType enum value
	ConnectionStateTypeDisconnecting = "DISCONNECTING"
)
const (
	// CustomerMasterKeySpecRsa2048 is a CustomerMasterKeySpec enum value
	CustomerMasterKeySpecRsa2048 = "RSA_2048"

	// CustomerMasterKeySpecRsa3072 is a CustomerMasterKeySpec enum value
	CustomerMasterKeySpecRsa3072 = "RSA_3072"

	// CustomerMasterKeySpecRsa4096 is a CustomerMasterKeySpec enum value
	CustomerMasterKeySpecRsa4096 = "RSA_4096"

	// CustomerMasterKeySpecEccNistP256 is a CustomerMasterKeySpec enum value
	CustomerMasterKeySpecEccNistP256 = "ECC_NIST_P256"

	// CustomerMasterKeySpecEccNistP384 is a CustomerMasterKeySpec enum value
	CustomerMasterKeySpecEccNistP384 = "ECC_NIST_P384"

	// CustomerMasterKeySpecEccNistP521 is a CustomerMasterKeySpec enum value
	CustomerMasterKeySpecEccNistP521 = "ECC_NIST_P521"

	// CustomerMasterKeySpecEccSecgP256k1 is a CustomerMasterKeySpec enum value
	CustomerMasterKeySpecEccSecgP256k1 = "ECC_SECG_P256K1"

	// CustomerMasterKeySpecSymmetricDefault is a CustomerMasterKeySpec enum value
	CustomerMasterKeySpecSymmetricDefault = "SYMMETRIC_DEFAULT"
)
const (
	// DataKeyPairSpecRsa2048 is a DataKeyPairSpec enum value
	DataKeyPairSpecRsa2048 = "RSA_2048"

	// DataKeyPairSpecRsa3072 is a DataKeyPairSpec enum value
	DataKeyPairSpecRsa3072 = "RSA_3072"

	// DataKeyPairSpecRsa4096 is a DataKeyPairSpec enum value
	DataKeyPairSpecRsa4096 = "RSA_4096"

	// DataKeyPairSpecEccNistP256 is a DataKeyPairSpec enum value
	DataKeyPairSpecEccNistP256 = "ECC_NIST_P256"

	// DataKeyPairSpecEccNistP384 is a DataKeyPairSpec enum value
	DataKeyPairSpecEccNistP384 = "ECC_NIST_P384"

	// DataKeyPairSpecEccNistP521 is a DataKeyPairSpec enum value
	DataKeyPairSpecEccNistP521 = "ECC_NIST_P521"

	// DataKeyPairSpecEccSecgP256k1 is a DataKeyPairSpec enum value
	DataKeyPairSpecEccSecgP256k1 = "ECC_SECG_P256K1"
)
const (
	// DataKeySpecAes256 is a DataKeySpec enum value
	DataKeySpecAes256 = "AES_256"

	// DataKeySpecAes128 is a DataKeySpec enum value
	DataKeySpecAes128 = "AES_128"
)
const (
	// EncryptionAlgorithmSpecSymmetricDefault is a EncryptionAlgorithmSpec enum value
	EncryptionAlgorithmSpecSymmetricDefault = "SYMMETRIC_DEFAULT"

	// EncryptionAlgorithmSpecRsaesOaepSha1 is a EncryptionAlgorithmSpec enum value
	EncryptionAlgorithmSpecRsaesOaepSha1 = "RSAES_OAEP_SHA_1"

	// EncryptionAlgorithmSpecRsaesOaepSha256 is a EncryptionAlgorithmSpec enum value
	EncryptionAlgorithmSpecRsaesOaepSha256 = "RSAES_OAEP_SHA_256"
)
const (
	// ExpirationModelTypeKeyMaterialExpires is a ExpirationModelType enum value
	ExpirationModelTypeKeyMaterialExpires = "KEY_MATERIAL_EXPIRES"

	// ExpirationModelTypeKeyMaterialDoesNotExpire is a ExpirationModelType enum value
	ExpirationModelTypeKeyMaterialDoesNotExpire = "KEY_MATERIAL_DOES_NOT_EXPIRE"
)
const (
	// GrantOperationDecrypt is a GrantOperation enum value
	GrantOperationDecrypt = "Decrypt"

	// GrantOperationEncrypt is a GrantOperation enum value
	GrantOperationEncrypt = "Encrypt"

	// GrantOperationGenerateDataKey is a GrantOperation enum value
	GrantOperationGenerateDataKey = "GenerateDataKey"

	// GrantOperationGenerateDataKeyWithoutPlaintext is a GrantOperation enum value
	GrantOperationGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext"

	// GrantOperationReEncryptFrom is a GrantOperation enum value
	GrantOperationReEncryptFrom = "ReEncryptFrom"

	// GrantOperationReEncryptTo is a GrantOperation enum value
	GrantOperationReEncryptTo = "ReEncryptTo"

	// GrantOperationSign is a GrantOperation enum value
	GrantOperationSign = "Sign"

	// GrantOperationVerify is a GrantOperation enum value
	GrantOperationVerify = "Verify"

	// GrantOperationGetPublicKey is a GrantOperation enum value
	GrantOperationGetPublicKey = "GetPublicKey"

	// GrantOperationCreateGrant is a GrantOperation enum value
	GrantOperationCreateGrant = "CreateGrant"

	// GrantOperationRetireGrant is a GrantOperation enum value
	GrantOperationRetireGrant = "RetireGrant"

	// GrantOperationDescribeKey is a GrantOperation enum value
	GrantOperationDescribeKey = "DescribeKey"

	// GrantOperationGenerateDataKeyPair is a GrantOperation enum value
	GrantOperationGenerateDataKeyPair = "GenerateDataKeyPair"

	// GrantOperationGenerateDataKeyPairWithoutPlaintext is a GrantOperation enum value
	GrantOperationGenerateDataKeyPairWithoutPlaintext = "GenerateDataKeyPairWithoutPlaintext"
)
const (
	// KeyManagerTypeAws is a KeyManagerType enum value
	KeyManagerTypeAws = "AWS"

	// KeyManagerTypeCustomer is a KeyManagerType enum value
	KeyManagerTypeCustomer = "CUSTOMER"
)
const (
	// KeyStateEnabled is a KeyState enum value
	KeyStateEnabled = "Enabled"

	// KeyStateDisabled is a KeyState enum value
	KeyStateDisabled = "Disabled"

	// KeyStatePendingDeletion is a KeyState enum value
	KeyStatePendingDeletion = "PendingDeletion"

	// KeyStatePendingImport is a KeyState enum value
	KeyStatePendingImport = "PendingImport"

	// KeyStateUnavailable is a KeyState enum value
	KeyStateUnavailable = "Unavailable"
)
const (
	// KeyUsageTypeSignVerify is a KeyUsageType enum value
	KeyUsageTypeSignVerify = "SIGN_VERIFY"

	// KeyUsageTypeEncryptDecrypt is a KeyUsageType enum value
	KeyUsageTypeEncryptDecrypt = "ENCRYPT_DECRYPT"
)
const (
	// MessageTypeRaw is a MessageType enum value
	MessageTypeRaw = "RAW"

	// MessageTypeDigest is a MessageType enum value
	MessageTypeDigest = "DIGEST"
)
const (
	// OriginTypeAwsKms is a OriginType enum value
	OriginTypeAwsKms = "AWS_KMS"

	// OriginTypeExternal is a OriginType enum value
	OriginTypeExternal = "EXTERNAL"

	// OriginTypeAwsCloudhsm is a OriginType enum value
	OriginTypeAwsCloudhsm = "AWS_CLOUDHSM"
)
const (
	// SigningAlgorithmSpecRsassaPssSha256 is a SigningAlgorithmSpec enum value
	SigningAlgorithmSpecRsassaPssSha256 = "RSASSA_PSS_SHA_256"

	// SigningAlgorithmSpecRsassaPssSha384 is a SigningAlgorithmSpec enum value
	SigningAlgorithmSpecRsassaPssSha384 = "RSASSA_PSS_SHA_384"

	// SigningAlgorithmSpecRsassaPssSha512 is a SigningAlgorithmSpec enum value
	SigningAlgorithmSpecRsassaPssSha512 = "RSASSA_PSS_SHA_512"

	// SigningAlgorithmSpecRsassaPkcs1V15Sha256 is a SigningAlgorithmSpec enum value
	SigningAlgorithmSpecRsassaPkcs1V15Sha256 = "RSASSA_PKCS1_V1_5_SHA_256"

	// SigningAlgorithmSpecRsassaPkcs1V15Sha384 is a SigningAlgorithmSpec enum value
	SigningAlgorithmSpecRsassaPkcs1V15Sha384 = "RSASSA_PKCS1_V1_5_SHA_384"

	// SigningAlgorithmSpecRsassaPkcs1V15Sha512 is a SigningAlgorithmSpec enum value
	SigningAlgorithmSpecRsassaPkcs1V15Sha512 = "RSASSA_PKCS1_V1_5_SHA_512"

	// SigningAlgorithmSpecEcdsaSha256 is a SigningAlgorithmSpec enum value
	SigningAlgorithmSpecEcdsaSha256 = "ECDSA_SHA_256"

	// SigningAlgorithmSpecEcdsaSha384 is a SigningAlgorithmSpec enum value
	SigningAlgorithmSpecEcdsaSha384 = "ECDSA_SHA_384"

	// SigningAlgorithmSpecEcdsaSha512 is a SigningAlgorithmSpec enum value
	SigningAlgorithmSpecEcdsaSha512 = "ECDSA_SHA_512"
)
const (

	// ErrCodeAlreadyExistsException for service response error code
	// "AlreadyExistsException".
	//
	// The request was rejected because it attempted to create a resource that already
	// exists.
	ErrCodeAlreadyExistsException = "AlreadyExistsException"

	// ErrCodeCloudHsmClusterInUseException for service response error code
	// "CloudHsmClusterInUseException".
	//
	// The request was rejected because the specified AWS CloudHSM cluster is already
	// associated with a custom key store or it shares a backup history with a cluster
	// that is associated with a custom key store. Each custom key store must be
	// associated with a different AWS CloudHSM cluster.
	//
	// Clusters that share a backup history have the same cluster certificate. To
	// view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
	// operation.
	ErrCodeCloudHsmClusterInUseException = "CloudHsmClusterInUseException"

	// ErrCodeCloudHsmClusterInvalidConfigurationException for service response error code
	// "CloudHsmClusterInvalidConfigurationException".
	//
	// The request was rejected because the associated AWS CloudHSM cluster did
	// not meet the configuration requirements for a custom key store.
	//
	//    * The cluster must be configured with private subnets in at least two
	//    different Availability Zones in the Region.
	//
	//    * The security group for the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
	//    (cloudhsm-cluster-<cluster-id>-sg) must include inbound rules and outbound
	//    rules that allow TCP traffic on ports 2223-2225. The Source in the inbound
	//    rules and the Destination in the outbound rules must match the security
	//    group ID. These rules are set by default when you create the cluster.
	//    Do not delete or change them. To get information about a particular security
	//    group, use the DescribeSecurityGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
	//    operation.
	//
	//    * The cluster must contain at least as many HSMs as the operation requires.
	//    To add HSMs, use the AWS CloudHSM CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html)
	//    operation. For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey
	//    operations, the AWS CloudHSM cluster must have at least two active HSMs,
	//    each in a different Availability Zone. For the ConnectCustomKeyStore operation,
	//    the AWS CloudHSM must contain at least one active HSM.
	//
	// For information about the requirements for an AWS CloudHSM cluster that is
	// associated with a custom key store, see Assemble the Prerequisites (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore)
	// in the AWS Key Management Service Developer Guide. For information about
	// creating a private subnet for an AWS CloudHSM cluster, see Create a Private
	// Subnet (https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html)
	// in the AWS CloudHSM User Guide. For information about cluster security groups,
	// see Configure a Default Security Group (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
	// in the AWS CloudHSM User Guide .
	ErrCodeCloudHsmClusterInvalidConfigurationException = "CloudHsmClusterInvalidConfigurationException"

	// ErrCodeCloudHsmClusterNotActiveException for service response error code
	// "CloudHsmClusterNotActiveException".
	//
	// The request was rejected because the AWS CloudHSM cluster that is associated
	// with the custom key store is not active. Initialize and activate the cluster
	// and try the command again. For detailed instructions, see Getting Started
	// (https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html)
	// in the AWS CloudHSM User Guide.
	ErrCodeCloudHsmClusterNotActiveException = "CloudHsmClusterNotActiveException"

	// ErrCodeCloudHsmClusterNotFoundException for service response error code
	// "CloudHsmClusterNotFoundException".
	//
	// The request was rejected because AWS KMS cannot find the AWS CloudHSM cluster
	// with the specified cluster ID. Retry the request with a different cluster
	// ID.
	ErrCodeCloudHsmClusterNotFoundException = "CloudHsmClusterNotFoundException"

	// ErrCodeCloudHsmClusterNotRelatedException for service response error code
	// "CloudHsmClusterNotRelatedException".
	//
	// The request was rejected because the specified AWS CloudHSM cluster has a
	// different cluster certificate than the original cluster. You cannot use the
	// operation to specify an unrelated cluster.
	//
	// Specify a cluster that shares a backup history with the original cluster.
	// This includes clusters that were created from a backup of the current cluster,
	// and clusters that were created from the same backup that produced the current
	// cluster.
	//
	// Clusters that share a backup history have the same cluster certificate. To
	// view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
	// operation.
	ErrCodeCloudHsmClusterNotRelatedException = "CloudHsmClusterNotRelatedException"

	// ErrCodeCustomKeyStoreHasCMKsException for service response error code
	// "CustomKeyStoreHasCMKsException".
	//
	// The request was rejected because the custom key store contains AWS KMS customer
	// master keys (CMKs). After verifying that you do not need to use the CMKs,
	// use the ScheduleKeyDeletion operation to delete the CMKs. After they are
	// deleted, you can delete the custom key store.
	ErrCodeCustomKeyStoreHasCMKsException = "CustomKeyStoreHasCMKsException"

	// ErrCodeCustomKeyStoreInvalidStateException for service response error code
	// "CustomKeyStoreInvalidStateException".
	//
	// The request was rejected because of the ConnectionState of the custom key
	// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores
	// operation.
	//
	// This exception is thrown under the following conditions:
	//
	//    * You requested the CreateKey or GenerateRandom operation in a custom
	//    key store that is not connected. These operations are valid only when
	//    the custom key store ConnectionState is CONNECTED.
	//
	//    * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation
	//    on a custom key store that is not disconnected. This operation is valid
	//    only when the custom key store ConnectionState is DISCONNECTED.
	//
	//    * You requested the ConnectCustomKeyStore operation on a custom key store
	//    with a ConnectionState of DISCONNECTING or FAILED. This operation is valid
	//    for all other ConnectionState values.
	ErrCodeCustomKeyStoreInvalidStateException = "CustomKeyStoreInvalidStateException"

	// ErrCodeCustomKeyStoreNameInUseException for service response error code
	// "CustomKeyStoreNameInUseException".
	//
	// The request was rejected because the specified custom key store name is already
	// assigned to another custom key store in the account. Try again with a custom
	// key store name that is unique in the account.
	ErrCodeCustomKeyStoreNameInUseException = "CustomKeyStoreNameInUseException"

	// ErrCodeCustomKeyStoreNotFoundException for service response error code
	// "CustomKeyStoreNotFoundException".
	//
	// The request was rejected because AWS KMS cannot find a custom key store with
	// the specified key store name or ID.
	ErrCodeCustomKeyStoreNotFoundException = "CustomKeyStoreNotFoundException"

	// ErrCodeDependencyTimeoutException for service response error code
	// "DependencyTimeoutException".
	//
	// The system timed out while trying to fulfill the request. The request can
	// be retried.
	ErrCodeDependencyTimeoutException = "DependencyTimeoutException"

	// ErrCodeDisabledException for service response error code
	// "DisabledException".
	//
	// The request was rejected because the specified CMK is not enabled.
	ErrCodeDisabledException = "DisabledException"

	// ErrCodeExpiredImportTokenException for service response error code
	// "ExpiredImportTokenException".
	//
	// The request was rejected because the specified import token is expired. Use
	// GetParametersForImport to get a new import token and public key, use the
	// new public key to encrypt the key material, and then try the request again.
	ErrCodeExpiredImportTokenException = "ExpiredImportTokenException"

	// ErrCodeIncorrectKeyException for service response error code
	// "IncorrectKeyException".
	//
	// The request was rejected because the specified CMK cannot decrypt the data.
	// The KeyId in a Decrypt request and the SourceKeyId in a ReEncrypt request
	// must identify the same CMK that was used to encrypt the ciphertext.
	ErrCodeIncorrectKeyException = "IncorrectKeyException"

	// ErrCodeIncorrectKeyMaterialException for service response error code
	// "IncorrectKeyMaterialException".
	//
	// The request was rejected because the key material in the request is, expired,
	// invalid, or is not the same key material that was previously imported into
	// this customer master key (CMK).
	ErrCodeIncorrectKeyMaterialException = "IncorrectKeyMaterialException"

	// ErrCodeIncorrectTrustAnchorException for service response error code
	// "IncorrectTrustAnchorException".
	//
	// The request was rejected because the trust anchor certificate in the request
	// is not the trust anchor certificate for the specified AWS CloudHSM cluster.
	//
	// When you initialize the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr),
	// you create the trust anchor certificate and save it in the customerCA.crt
	// file.
	ErrCodeIncorrectTrustAnchorException = "IncorrectTrustAnchorException"

	// ErrCodeInternalException for service response error code
	// "KMSInternalException".
	//
	// The request was rejected because an internal exception occurred. The request
	// can be retried.
	ErrCodeInternalException = "KMSInternalException"

	// ErrCodeInvalidAliasNameException for service response error code
	// "InvalidAliasNameException".
	//
	// The request was rejected because the specified alias name is not valid.
	ErrCodeInvalidAliasNameException = "InvalidAliasNameException"

	// ErrCodeInvalidArnException for service response error code
	// "InvalidArnException".
	//
	// The request was rejected because a specified ARN, or an ARN in a key policy,
	// is not valid.
	ErrCodeInvalidArnException = "InvalidArnException"

	// ErrCodeInvalidCiphertextException for service response error code
	// "InvalidCiphertextException".
	//
	// From the Decrypt or ReEncrypt operation, the request was rejected because
	// the specified ciphertext, or additional authenticated data incorporated into
	// the ciphertext, such as the encryption context, is corrupted, missing, or
	// otherwise invalid.
	//
	// From the ImportKeyMaterial operation, the request was rejected because AWS
	// KMS could not decrypt the encrypted (wrapped) key material.
	ErrCodeInvalidCiphertextException = "InvalidCiphertextException"

	// ErrCodeInvalidGrantIdException for service response error code
	// "InvalidGrantIdException".
	//
	// The request was rejected because the specified GrantId is not valid.
	ErrCodeInvalidGrantIdException = "InvalidGrantIdException"

	// ErrCodeInvalidGrantTokenException for service response error code
	// "InvalidGrantTokenException".
	//
	// The request was rejected because the specified grant token is not valid.
	ErrCodeInvalidGrantTokenException = "InvalidGrantTokenException"

	// ErrCodeInvalidImportTokenException for service response error code
	// "InvalidImportTokenException".
	//
	// The request was rejected because the provided import token is invalid or
	// is associated with a different customer master key (CMK).
	ErrCodeInvalidImportTokenException = "InvalidImportTokenException"

	// ErrCodeInvalidKeyUsageException for service response error code
	// "InvalidKeyUsageException".
	//
	// The request was rejected for one of the following reasons:
	//
	//    * The KeyUsage value of the CMK is incompatible with the API operation.
	//
	//    * The encryption algorithm or signing algorithm specified for the operation
	//    is incompatible with the type of key material in the CMK (CustomerMasterKeySpec).
	//
	// For encrypting, decrypting, re-encrypting, and generating data keys, the
	// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
	// must be SIGN_VERIFY. To find the KeyUsage of a CMK, use the DescribeKey operation.
	//
	// To find the encryption or signing algorithms supported for a particular CMK,
	// use the DescribeKey operation.
	ErrCodeInvalidKeyUsageException = "InvalidKeyUsageException"

	// ErrCodeInvalidMarkerException for service response error code
	// "InvalidMarkerException".
	//
	// The request was rejected because the marker that specifies where pagination
	// should next begin is not valid.
	ErrCodeInvalidMarkerException = "InvalidMarkerException"

	// ErrCodeInvalidStateException for service response error code
	// "KMSInvalidStateException".
	//
	// The request was rejected because the state of the specified resource is not
	// valid for this request.
	//
	// For more information about how key state affects the use of a CMK, see How
	// Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
	// in the AWS Key Management Service Developer Guide .
	ErrCodeInvalidStateException = "KMSInvalidStateException"

	// ErrCodeKMSInvalidSignatureException for service response error code
	// "KMSInvalidSignatureException".
	//
	// The request was rejected because the signature verification failed. Signature
	// verification fails when it cannot confirm that signature was produced by
	// signing the specified message with the specified CMK and signing algorithm.
	ErrCodeKMSInvalidSignatureException = "KMSInvalidSignatureException"

	// ErrCodeKeyUnavailableException for service response error code
	// "KeyUnavailableException".
	//
	// The request was rejected because the specified CMK was not available. You
	// can retry the request.
	ErrCodeKeyUnavailableException = "KeyUnavailableException"

	// ErrCodeLimitExceededException for service response error code
	// "LimitExceededException".
	//
	// The request was rejected because a quota was exceeded. For more information,
	// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
	// in the AWS Key Management Service Developer Guide.
	ErrCodeLimitExceededException = "LimitExceededException"

	// ErrCodeMalformedPolicyDocumentException for service response error code
	// "MalformedPolicyDocumentException".
	//
	// The request was rejected because the specified policy is not syntactically
	// or semantically correct.
	ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException"

	// ErrCodeNotFoundException for service response error code
	// "NotFoundException".
	//
	// The request was rejected because the specified entity or resource could not
	// be found.
	ErrCodeNotFoundException = "NotFoundException"

	// ErrCodeTagException for service response error code
	// "TagException".
	//
	// The request was rejected because one or more tags are not valid.
	ErrCodeTagException = "TagException"

	// ErrCodeUnsupportedOperationException for service response error code
	// "UnsupportedOperationException".
	//
	// The request was rejected because a specified parameter is not supported or
	// a specified resource is not valid for this operation.
	ErrCodeUnsupportedOperationException = "UnsupportedOperationException"
)
const (
	ServiceName = "kms"       // Name of service.
	EndpointsID = ServiceName // ID to lookup a service endpoint with.
	ServiceID   = "KMS"       // ServiceID is a unique identifier of a specific service.
)

Service information constants

const (
	// WrappingKeySpecRsa2048 is a WrappingKeySpec enum value
	WrappingKeySpecRsa2048 = "RSA_2048"
)

func AlgorithmSpec_Values

func AlgorithmSpec_Values() []string

AlgorithmSpec_Values returns all elements of the AlgorithmSpec enum

func ConnectionErrorCodeType_Values

func ConnectionErrorCodeType_Values() []string

ConnectionErrorCodeType_Values returns all elements of the ConnectionErrorCodeType enum

func ConnectionStateType_Values

func ConnectionStateType_Values() []string

ConnectionStateType_Values returns all elements of the ConnectionStateType enum

func CustomerMasterKeySpec_Values

func CustomerMasterKeySpec_Values() []string

CustomerMasterKeySpec_Values returns all elements of the CustomerMasterKeySpec enum

func DataKeyPairSpec_Values

func DataKeyPairSpec_Values() []string

DataKeyPairSpec_Values returns all elements of the DataKeyPairSpec enum

func DataKeySpec_Values

func DataKeySpec_Values() []string

DataKeySpec_Values returns all elements of the DataKeySpec enum

func EncryptionAlgorithmSpec_Values

func EncryptionAlgorithmSpec_Values() []string

EncryptionAlgorithmSpec_Values returns all elements of the EncryptionAlgorithmSpec enum

func ExpirationModelType_Values

func ExpirationModelType_Values() []string

ExpirationModelType_Values returns all elements of the ExpirationModelType enum

func GrantOperation_Values

func GrantOperation_Values() []string

GrantOperation_Values returns all elements of the GrantOperation enum

func KeyManagerType_Values

func KeyManagerType_Values() []string

KeyManagerType_Values returns all elements of the KeyManagerType enum

func KeyState_Values

func KeyState_Values() []string

KeyState_Values returns all elements of the KeyState enum

func KeyUsageType_Values

func KeyUsageType_Values() []string

KeyUsageType_Values returns all elements of the KeyUsageType enum

func MessageType_Values

func MessageType_Values() []string

MessageType_Values returns all elements of the MessageType enum

func OriginType_Values

func OriginType_Values() []string

OriginType_Values returns all elements of the OriginType enum

func SigningAlgorithmSpec_Values

func SigningAlgorithmSpec_Values() []string

SigningAlgorithmSpec_Values returns all elements of the SigningAlgorithmSpec enum

func WrappingKeySpec_Values

func WrappingKeySpec_Values() []string

WrappingKeySpec_Values returns all elements of the WrappingKeySpec enum

type AliasListEntry

type AliasListEntry struct {

	// String that contains the key ARN.
	AliasArn *string `min:"20" type:"string"`

	// String that contains the alias. This value begins with alias/.
	AliasName *string `min:"1" type:"string"`

	// String that contains the key identifier referred to by the alias.
	TargetKeyId *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

Contains information about an alias.

func (AliasListEntry) GoString

func (s AliasListEntry) GoString() string

GoString returns the string representation

func (*AliasListEntry) SetAliasArn

func (s *AliasListEntry) SetAliasArn(v string) *AliasListEntry

SetAliasArn sets the AliasArn field's value.

func (*AliasListEntry) SetAliasName

func (s *AliasListEntry) SetAliasName(v string) *AliasListEntry

SetAliasName sets the AliasName field's value.

func (*AliasListEntry) SetTargetKeyId

func (s *AliasListEntry) SetTargetKeyId(v string) *AliasListEntry

SetTargetKeyId sets the TargetKeyId field's value.

func (AliasListEntry) String

func (s AliasListEntry) String() string

String returns the string representation

type AlreadyExistsException

type AlreadyExistsException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because it attempted to create a resource that already exists.

func (*AlreadyExistsException) Code

func (s *AlreadyExistsException) Code() string

Code returns the exception type name.

func (*AlreadyExistsException) Error

func (s *AlreadyExistsException) Error() string

func (AlreadyExistsException) GoString

func (s AlreadyExistsException) GoString() string

GoString returns the string representation

func (*AlreadyExistsException) Message

func (s *AlreadyExistsException) Message() string

Message returns the exception's message.

func (*AlreadyExistsException) OrigErr

func (s *AlreadyExistsException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*AlreadyExistsException) RequestID

func (s *AlreadyExistsException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*AlreadyExistsException) StatusCode

func (s *AlreadyExistsException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (AlreadyExistsException) String

func (s AlreadyExistsException) String() string

String returns the string representation

type CancelKeyDeletionInput

type CancelKeyDeletionInput struct {

	// The unique identifier for the customer master key (CMK) for which to cancel
	// deletion.
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (CancelKeyDeletionInput) GoString

func (s CancelKeyDeletionInput) GoString() string

GoString returns the string representation

func (*CancelKeyDeletionInput) SetKeyId

func (s *CancelKeyDeletionInput) SetKeyId(v string) *CancelKeyDeletionInput

SetKeyId sets the KeyId field's value.

func (CancelKeyDeletionInput) String

func (s CancelKeyDeletionInput) String() string

String returns the string representation

func (*CancelKeyDeletionInput) Validate

func (s *CancelKeyDeletionInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CancelKeyDeletionOutput

type CancelKeyDeletionOutput struct {

	// The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
	// of the CMK whose deletion is canceled.
	KeyId *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (CancelKeyDeletionOutput) GoString

func (s CancelKeyDeletionOutput) GoString() string

GoString returns the string representation

func (*CancelKeyDeletionOutput) SetKeyId

func (s *CancelKeyDeletionOutput) SetKeyId(v string) *CancelKeyDeletionOutput

SetKeyId sets the KeyId field's value.

func (CancelKeyDeletionOutput) String

func (s CancelKeyDeletionOutput) String() string

String returns the string representation

type CloudHsmClusterInUseException

type CloudHsmClusterInUseException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the specified AWS CloudHSM cluster is already associated with a custom key store or it shares a backup history with a cluster that is associated with a custom key store. Each custom key store must be associated with a different AWS CloudHSM cluster.

Clusters that share a backup history have the same cluster certificate. To view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) operation.

func (*CloudHsmClusterInUseException) Code

func (s *CloudHsmClusterInUseException) Code() string

Code returns the exception type name.

func (*CloudHsmClusterInUseException) Error

func (s *CloudHsmClusterInUseException) Error() string

func (CloudHsmClusterInUseException) GoString

func (s CloudHsmClusterInUseException) GoString() string

GoString returns the string representation

func (*CloudHsmClusterInUseException) Message

func (s *CloudHsmClusterInUseException) Message() string

Message returns the exception's message.

func (*CloudHsmClusterInUseException) OrigErr

func (s *CloudHsmClusterInUseException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*CloudHsmClusterInUseException) RequestID

func (s *CloudHsmClusterInUseException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*CloudHsmClusterInUseException) StatusCode

func (s *CloudHsmClusterInUseException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (CloudHsmClusterInUseException) String

func (s CloudHsmClusterInUseException) String() string

String returns the string representation

type CloudHsmClusterInvalidConfigurationException

type CloudHsmClusterInvalidConfigurationException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the associated AWS CloudHSM cluster did not meet the configuration requirements for a custom key store.

* The cluster must be configured with private subnets in at least two
different Availability Zones in the Region.

* The security group for the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
(cloudhsm-cluster-<cluster-id>-sg) must include inbound rules and outbound
rules that allow TCP traffic on ports 2223-2225. The Source in the inbound
rules and the Destination in the outbound rules must match the security
group ID. These rules are set by default when you create the cluster.
Do not delete or change them. To get information about a particular security
group, use the DescribeSecurityGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
operation.

* The cluster must contain at least as many HSMs as the operation requires.
To add HSMs, use the AWS CloudHSM CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html)
operation. For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey
operations, the AWS CloudHSM cluster must have at least two active HSMs,
each in a different Availability Zone. For the ConnectCustomKeyStore operation,
the AWS CloudHSM must contain at least one active HSM.

For information about the requirements for an AWS CloudHSM cluster that is associated with a custom key store, see Assemble the Prerequisites (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore) in the AWS Key Management Service Developer Guide. For information about creating a private subnet for an AWS CloudHSM cluster, see Create a Private Subnet (https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) in the AWS CloudHSM User Guide. For information about cluster security groups, see Configure a Default Security Group (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html) in the AWS CloudHSM User Guide .

func (*CloudHsmClusterInvalidConfigurationException) Code

func (s *CloudHsmClusterInvalidConfigurationException) Code() string

Code returns the exception type name.

func (*CloudHsmClusterInvalidConfigurationException) Error

func (s *CloudHsmClusterInvalidConfigurationException) Error() string

func (CloudHsmClusterInvalidConfigurationException) GoString

func (s CloudHsmClusterInvalidConfigurationException) GoString() string

GoString returns the string representation

func (*CloudHsmClusterInvalidConfigurationException) Message

func (s *CloudHsmClusterInvalidConfigurationException) Message() string

Message returns the exception's message.

func (*CloudHsmClusterInvalidConfigurationException) OrigErr

func (s *CloudHsmClusterInvalidConfigurationException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*CloudHsmClusterInvalidConfigurationException) RequestID

func (s *CloudHsmClusterInvalidConfigurationException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*CloudHsmClusterInvalidConfigurationException) StatusCode

func (s *CloudHsmClusterInvalidConfigurationException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (CloudHsmClusterInvalidConfigurationException) String

func (s CloudHsmClusterInvalidConfigurationException) String() string

String returns the string representation

type CloudHsmClusterNotActiveException

type CloudHsmClusterNotActiveException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the AWS CloudHSM cluster that is associated with the custom key store is not active. Initialize and activate the cluster and try the command again. For detailed instructions, see Getting Started (https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) in the AWS CloudHSM User Guide.

func (*CloudHsmClusterNotActiveException) Code

func (s *CloudHsmClusterNotActiveException) Code() string

Code returns the exception type name.

func (*CloudHsmClusterNotActiveException) Error

func (s *CloudHsmClusterNotActiveException) Error() string

func (CloudHsmClusterNotActiveException) GoString

func (s CloudHsmClusterNotActiveException) GoString() string

GoString returns the string representation

func (*CloudHsmClusterNotActiveException) Message

func (s *CloudHsmClusterNotActiveException) Message() string

Message returns the exception's message.

func (*CloudHsmClusterNotActiveException) OrigErr

func (s *CloudHsmClusterNotActiveException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*CloudHsmClusterNotActiveException) RequestID

func (s *CloudHsmClusterNotActiveException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*CloudHsmClusterNotActiveException) StatusCode

func (s *CloudHsmClusterNotActiveException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (CloudHsmClusterNotActiveException) String

func (s CloudHsmClusterNotActiveException) String() string

String returns the string representation

type CloudHsmClusterNotFoundException

type CloudHsmClusterNotFoundException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because AWS KMS cannot find the AWS CloudHSM cluster with the specified cluster ID. Retry the request with a different cluster ID.

func (*CloudHsmClusterNotFoundException) Code

func (s *CloudHsmClusterNotFoundException) Code() string

Code returns the exception type name.

func (*CloudHsmClusterNotFoundException) Error

func (s *CloudHsmClusterNotFoundException) Error() string

func (CloudHsmClusterNotFoundException) GoString

func (s CloudHsmClusterNotFoundException) GoString() string

GoString returns the string representation

func (*CloudHsmClusterNotFoundException) Message

func (s *CloudHsmClusterNotFoundException) Message() string

Message returns the exception's message.

func (*CloudHsmClusterNotFoundException) OrigErr

func (s *CloudHsmClusterNotFoundException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*CloudHsmClusterNotFoundException) RequestID

func (s *CloudHsmClusterNotFoundException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*CloudHsmClusterNotFoundException) StatusCode

func (s *CloudHsmClusterNotFoundException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (CloudHsmClusterNotFoundException) String

func (s CloudHsmClusterNotFoundException) String() string

String returns the string representation

type CloudHsmClusterNotRelatedException

type CloudHsmClusterNotRelatedException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the specified AWS CloudHSM cluster has a different cluster certificate than the original cluster. You cannot use the operation to specify an unrelated cluster.

Specify a cluster that shares a backup history with the original cluster. This includes clusters that were created from a backup of the current cluster, and clusters that were created from the same backup that produced the current cluster.

Clusters that share a backup history have the same cluster certificate. To view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) operation.

func (*CloudHsmClusterNotRelatedException) Code

func (s *CloudHsmClusterNotRelatedException) Code() string

Code returns the exception type name.

func (*CloudHsmClusterNotRelatedException) Error

func (s *CloudHsmClusterNotRelatedException) Error() string

func (CloudHsmClusterNotRelatedException) GoString

func (s CloudHsmClusterNotRelatedException) GoString() string

GoString returns the string representation

func (*CloudHsmClusterNotRelatedException) Message

func (s *CloudHsmClusterNotRelatedException) Message() string

Message returns the exception's message.

func (*CloudHsmClusterNotRelatedException) OrigErr

func (s *CloudHsmClusterNotRelatedException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*CloudHsmClusterNotRelatedException) RequestID

func (s *CloudHsmClusterNotRelatedException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*CloudHsmClusterNotRelatedException) StatusCode

func (s *CloudHsmClusterNotRelatedException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (CloudHsmClusterNotRelatedException) String

func (s CloudHsmClusterNotRelatedException) String() string

String returns the string representation

type ConnectCustomKeyStoreInput

type ConnectCustomKeyStoreInput struct {

	// Enter the key store ID of the custom key store that you want to connect.
	// To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
	//
	// CustomKeyStoreId is a required field
	CustomKeyStoreId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (ConnectCustomKeyStoreInput) GoString

func (s ConnectCustomKeyStoreInput) GoString() string

GoString returns the string representation

func (*ConnectCustomKeyStoreInput) SetCustomKeyStoreId

func (s *ConnectCustomKeyStoreInput) SetCustomKeyStoreId(v string) *ConnectCustomKeyStoreInput

SetCustomKeyStoreId sets the CustomKeyStoreId field's value.

func (ConnectCustomKeyStoreInput) String

func (s ConnectCustomKeyStoreInput) String() string

String returns the string representation

func (*ConnectCustomKeyStoreInput) Validate

func (s *ConnectCustomKeyStoreInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ConnectCustomKeyStoreOutput

type ConnectCustomKeyStoreOutput struct {
	// contains filtered or unexported fields
}

func (ConnectCustomKeyStoreOutput) GoString

func (s ConnectCustomKeyStoreOutput) GoString() string

GoString returns the string representation

func (ConnectCustomKeyStoreOutput) String

func (s ConnectCustomKeyStoreOutput) String() string

String returns the string representation

type CreateAliasInput

type CreateAliasInput struct {

	// Specifies the alias name. This value must begin with alias/ followed by a
	// name, such as alias/ExampleAlias. The alias name cannot begin with alias/aws/.
	// The alias/aws/ prefix is reserved for AWS managed CMKs.
	//
	// AliasName is a required field
	AliasName *string `min:"1" type:"string" required:"true"`

	// Identifies the CMK to which the alias refers. Specify the key ID or the Amazon
	// Resource Name (ARN) of the CMK. You cannot specify another alias. For help
	// finding the key ID and ARN, see Finding the Key ID and ARN (https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn)
	// in the AWS Key Management Service Developer Guide.
	//
	// TargetKeyId is a required field
	TargetKeyId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (CreateAliasInput) GoString

func (s CreateAliasInput) GoString() string

GoString returns the string representation

func (*CreateAliasInput) SetAliasName

func (s *CreateAliasInput) SetAliasName(v string) *CreateAliasInput

SetAliasName sets the AliasName field's value.

func (*CreateAliasInput) SetTargetKeyId

func (s *CreateAliasInput) SetTargetKeyId(v string) *CreateAliasInput

SetTargetKeyId sets the TargetKeyId field's value.

func (CreateAliasInput) String

func (s CreateAliasInput) String() string

String returns the string representation

func (*CreateAliasInput) Validate

func (s *CreateAliasInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateAliasOutput

type CreateAliasOutput struct {
	// contains filtered or unexported fields
}

func (CreateAliasOutput) GoString

func (s CreateAliasOutput) GoString() string

GoString returns the string representation

func (CreateAliasOutput) String

func (s CreateAliasOutput) String() string

String returns the string representation

type CreateCustomKeyStoreInput

type CreateCustomKeyStoreInput struct {

	// Identifies the AWS CloudHSM cluster for the custom key store. Enter the cluster
	// ID of any active AWS CloudHSM cluster that is not already associated with
	// a custom key store. To find the cluster ID, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
	// operation.
	//
	// CloudHsmClusterId is a required field
	CloudHsmClusterId *string `min:"19" type:"string" required:"true"`

	// Specifies a friendly name for the custom key store. The name must be unique
	// in your AWS account.
	//
	// CustomKeyStoreName is a required field
	CustomKeyStoreName *string `min:"1" type:"string" required:"true"`

	// Enter the password of the kmsuser crypto user (CU) account (https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser)
	// in the specified AWS CloudHSM cluster. AWS KMS logs into the cluster as this
	// user to manage key material on your behalf.
	//
	// The password must be a string of 7 to 32 characters. Its value is case sensitive.
	//
	// This parameter tells AWS KMS the kmsuser account password; it does not change
	// the password in the AWS CloudHSM cluster.
	//
	// KeyStorePassword is a required field
	KeyStorePassword *string `min:"7" type:"string" required:"true" sensitive:"true"`

	// Enter the content of the trust anchor certificate for the cluster. This is
	// the content of the customerCA.crt file that you created when you initialized
	// the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html).
	//
	// TrustAnchorCertificate is a required field
	TrustAnchorCertificate *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (CreateCustomKeyStoreInput) GoString

func (s CreateCustomKeyStoreInput) GoString() string

GoString returns the string representation

func (*CreateCustomKeyStoreInput) SetCloudHsmClusterId

func (s *CreateCustomKeyStoreInput) SetCloudHsmClusterId(v string) *CreateCustomKeyStoreInput

SetCloudHsmClusterId sets the CloudHsmClusterId field's value.

func (*CreateCustomKeyStoreInput) SetCustomKeyStoreName

func (s *CreateCustomKeyStoreInput) SetCustomKeyStoreName(v string) *CreateCustomKeyStoreInput

SetCustomKeyStoreName sets the CustomKeyStoreName field's value.

func (*CreateCustomKeyStoreInput) SetKeyStorePassword

func (s *CreateCustomKeyStoreInput) SetKeyStorePassword(v string) *CreateCustomKeyStoreInput

SetKeyStorePassword sets the KeyStorePassword field's value.

func (*CreateCustomKeyStoreInput) SetTrustAnchorCertificate

func (s *CreateCustomKeyStoreInput) SetTrustAnchorCertificate(v string) *CreateCustomKeyStoreInput

SetTrustAnchorCertificate sets the TrustAnchorCertificate field's value.

func (CreateCustomKeyStoreInput) String

func (s CreateCustomKeyStoreInput) String() string

String returns the string representation

func (*CreateCustomKeyStoreInput) Validate

func (s *CreateCustomKeyStoreInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateCustomKeyStoreOutput

type CreateCustomKeyStoreOutput struct {

	// A unique identifier for the new custom key store.
	CustomKeyStoreId *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (CreateCustomKeyStoreOutput) GoString

func (s CreateCustomKeyStoreOutput) GoString() string

GoString returns the string representation

func (*CreateCustomKeyStoreOutput) SetCustomKeyStoreId

func (s *CreateCustomKeyStoreOutput) SetCustomKeyStoreId(v string) *CreateCustomKeyStoreOutput

SetCustomKeyStoreId sets the CustomKeyStoreId field's value.

func (CreateCustomKeyStoreOutput) String

func (s CreateCustomKeyStoreOutput) String() string

String returns the string representation

type CreateGrantInput

type CreateGrantInput struct {

	// Allows a cryptographic operation (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
	// only when the encryption context matches or includes the encryption context
	// specified in this structure. For more information about encryption context,
	// see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
	// in the AWS Key Management Service Developer Guide .
	Constraints *GrantConstraints `type:"structure"`

	// A list of grant tokens.
	//
	// For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
	// in the AWS Key Management Service Developer Guide.
	GrantTokens []*string `type:"list"`

	// The principal that is given permission to perform the operations that the
	// grant permits.
	//
	// To specify the principal, use the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
	// of an AWS principal. Valid AWS principals include AWS accounts (root), IAM
	// users, IAM roles, federated users, and assumed role users. For examples of
	// the ARN syntax to use for specifying a principal, see AWS Identity and Access
	// Management (IAM) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam)
	// in the Example ARNs section of the AWS General Reference.
	//
	// GranteePrincipal is a required field
	GranteePrincipal *string `min:"1" type:"string" required:"true"`

	// The unique identifier for the customer master key (CMK) that the grant applies
	// to.
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify
	// a CMK in a different AWS account, you must use the key ARN.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`

	// A friendly name for identifying the grant. Use this value to prevent the
	// unintended creation of duplicate grants when retrying this request.
	//
	// When this value is absent, all CreateGrant requests result in a new grant
	// with a unique GrantId even if all the supplied parameters are identical.
	// This can result in unintended duplicates when you retry the CreateGrant request.
	//
	// When this value is present, you can retry a CreateGrant request with identical
	// parameters; if the grant already exists, the original GrantId is returned
	// without creating a new grant. Note that the returned grant token is unique
	// with every CreateGrant request, even when a duplicate GrantId is returned.
	// All grant tokens obtained in this way can be used interchangeably.
	Name *string `min:"1" type:"string"`

	// A list of operations that the grant permits.
	//
	// Operations is a required field
	Operations []*string `type:"list" required:"true"`

	// The principal that is given permission to retire the grant by using RetireGrant
	// operation.
	//
	// To specify the principal, use the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
	// of an AWS principal. Valid AWS principals include AWS accounts (root), IAM
	// users, federated users, and assumed role users. For examples of the ARN syntax
	// to use for specifying a principal, see AWS Identity and Access Management
	// (IAM) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam)
	// in the Example ARNs section of the AWS General Reference.
	RetiringPrincipal *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (CreateGrantInput) GoString

func (s CreateGrantInput) GoString() string

GoString returns the string representation

func (*CreateGrantInput) SetConstraints

func (s *CreateGrantInput) SetConstraints(v *GrantConstraints) *CreateGrantInput

SetConstraints sets the Constraints field's value.

func (*CreateGrantInput) SetGrantTokens

func (s *CreateGrantInput) SetGrantTokens(v []*string) *CreateGrantInput

SetGrantTokens sets the GrantTokens field's value.

func (*CreateGrantInput) SetGranteePrincipal

func (s *CreateGrantInput) SetGranteePrincipal(v string) *CreateGrantInput

SetGranteePrincipal sets the GranteePrincipal field's value.

func (*CreateGrantInput) SetKeyId

func (s *CreateGrantInput) SetKeyId(v string) *CreateGrantInput

SetKeyId sets the KeyId field's value.

func (*CreateGrantInput) SetName

func (s *CreateGrantInput) SetName(v string) *CreateGrantInput

SetName sets the Name field's value.

func (*CreateGrantInput) SetOperations

func (s *CreateGrantInput) SetOperations(v []*string) *CreateGrantInput

SetOperations sets the Operations field's value.

func (*CreateGrantInput) SetRetiringPrincipal

func (s *CreateGrantInput) SetRetiringPrincipal(v string) *CreateGrantInput

SetRetiringPrincipal sets the RetiringPrincipal field's value.

func (CreateGrantInput) String

func (s CreateGrantInput) String() string

String returns the string representation

func (*CreateGrantInput) Validate

func (s *CreateGrantInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateGrantOutput

type CreateGrantOutput struct {

	// The unique identifier for the grant.
	//
	// You can use the GrantId in a subsequent RetireGrant or RevokeGrant operation.
	GrantId *string `min:"1" type:"string"`

	// The grant token.
	//
	// For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
	// in the AWS Key Management Service Developer Guide.
	GrantToken *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (CreateGrantOutput) GoString

func (s CreateGrantOutput) GoString() string

GoString returns the string representation

func (*CreateGrantOutput) SetGrantId

func (s *CreateGrantOutput) SetGrantId(v string) *CreateGrantOutput

SetGrantId sets the GrantId field's value.

func (*CreateGrantOutput) SetGrantToken

func (s *CreateGrantOutput) SetGrantToken(v string) *CreateGrantOutput

SetGrantToken sets the GrantToken field's value.

func (CreateGrantOutput) String

func (s CreateGrantOutput) String() string

String returns the string representation

type CreateKeyInput

type CreateKeyInput struct {

	// A flag to indicate whether to bypass the key policy lockout safety check.
	//
	// Setting this value to true increases the risk that the CMK becomes unmanageable.
	// Do not set this value to true indiscriminately.
	//
	// For more information, refer to the scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam)
	// section in the AWS Key Management Service Developer Guide .
	//
	// Use this parameter only when you include a policy in the request and you
	// intend to prevent the principal that is making the request from making a
	// subsequent PutKeyPolicy request on the CMK.
	//
	// The default value is false.
	BypassPolicyLockoutSafetyCheck *bool `type:"boolean"`

	// Creates the CMK in the specified custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
	// and the key material in its associated AWS CloudHSM cluster. To create a
	// CMK in a custom key store, you must also specify the Origin parameter with
	// a value of AWS_CLOUDHSM. The AWS CloudHSM cluster that is associated with
	// the custom key store must have at least two active HSMs, each in a different
	// Availability Zone in the Region.
	//
	// This parameter is valid only for symmetric CMKs. You cannot create an asymmetric
	// CMK in a custom key store.
	//
	// To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
	//
	// The response includes the custom key store ID and the ID of the AWS CloudHSM
	// cluster.
	//
	// This operation is part of the Custom Key Store feature (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
	// feature in AWS KMS, which combines the convenience and extensive integration
	// of AWS KMS with the isolation and control of a single-tenant key store.
	CustomKeyStoreId *string `min:"1" type:"string"`

	// Specifies the type of CMK to create. The default value, SYMMETRIC_DEFAULT,
	// creates a CMK with a 256-bit symmetric key for encryption and decryption.
	// For help choosing a key spec for your CMK, see How to Choose Your CMK Configuration
	// (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html)
	// in the AWS Key Management Service Developer Guide.
	//
	// The CustomerMasterKeySpec determines whether the CMK contains a symmetric
	// key or an asymmetric key pair. It also determines the encryption algorithms
	// or signing algorithms that the CMK supports. You can't change the CustomerMasterKeySpec
	// after the CMK is created. To further restrict the algorithms that can be
	// used with the CMK, use a condition key in its key policy or IAM policy. For
	// more information, see kms:EncryptionAlgorithm (https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-algorithm)
	// or kms:Signing Algorithm (https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-signing-algorithm)
	// in the AWS Key Management Service Developer Guide.
	//
	// AWS services that are integrated with AWS KMS (http://aws.amazon.com/kms/features/#AWS_Service_Integration)
	// use symmetric CMKs to protect your data. These services do not support asymmetric
	// CMKs. For help determining whether a CMK is symmetric or asymmetric, see
	// Identifying Symmetric and Asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html)
	// in the AWS Key Management Service Developer Guide.
	//
	// AWS KMS supports the following key specs for CMKs:
	//
	//    * Symmetric key (default) SYMMETRIC_DEFAULT (AES-256-GCM)
	//
	//    * Asymmetric RSA key pairs RSA_2048 RSA_3072 RSA_4096
	//
	//    * Asymmetric NIST-recommended elliptic curve key pairs ECC_NIST_P256 (secp256r1)
	//    ECC_NIST_P384 (secp384r1) ECC_NIST_P521 (secp521r1)
	//
	//    * Other asymmetric elliptic curve key pairs ECC_SECG_P256K1 (secp256k1),
	//    commonly used for cryptocurrencies.
	CustomerMasterKeySpec *string `type:"string" enum:"CustomerMasterKeySpec"`

	// A description of the CMK.
	//
	// Use a description that helps you decide whether the CMK is appropriate for
	// a task.
	Description *string `type:"string"`

	// Determines the cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
	// for which you can use the CMK. The default value is ENCRYPT_DECRYPT. This
	// parameter is required only for asymmetric CMKs. You can't change the KeyUsage
	// value after the CMK is created.
	//
	// Select only one valid value.
	//
	//    * For symmetric CMKs, omit the parameter or specify ENCRYPT_DECRYPT.
	//
	//    * For asymmetric CMKs with RSA key material, specify ENCRYPT_DECRYPT or
	//    SIGN_VERIFY.
	//
	//    * For asymmetric CMKs with ECC key material, specify SIGN_VERIFY.
	KeyUsage *string `type:"string" enum:"KeyUsageType"`

	// The source of the key material for the CMK. You cannot change the origin
	// after you create the CMK. The default is AWS_KMS, which means AWS KMS creates
	// the key material.
	//
	// When the parameter value is EXTERNAL, AWS KMS creates a CMK without key material
	// so that you can import key material from your existing key management infrastructure.
	// For more information about importing key material into AWS KMS, see Importing
	// Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html)
	// in the AWS Key Management Service Developer Guide. This value is valid only
	// for symmetric CMKs.
	//
	// When the parameter value is AWS_CLOUDHSM, AWS KMS creates the CMK in an AWS
	// KMS custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
	// and creates its key material in the associated AWS CloudHSM cluster. You
	// must also use the CustomKeyStoreId parameter to identify the custom key store.
	// This value is valid only for symmetric CMKs.
	Origin *string `type:"string" enum:"OriginType"`

	// The key policy to attach to the CMK.
	//
	// If you provide a key policy, it must meet the following criteria:
	//
	//    * If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy
	//    must allow the principal that is making the CreateKey request to make
	//    a subsequent PutKeyPolicy request on the CMK. This reduces the risk that
	//    the CMK becomes unmanageable. For more information, refer to the scenario
	//    in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam)
	//    section of the AWS Key Management Service Developer Guide .
	//
	//    * Each statement in the key policy must contain one or more principals.
	//    The principals in the key policy must exist and be visible to AWS KMS.
	//    When you create a new AWS principal (for example, an IAM user or role),
	//    you might need to enforce a delay before including the new principal in
	//    a key policy because the new principal might not be immediately visible
	//    to AWS KMS. For more information, see Changes that I make are not always
	//    immediately visible (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency)
	//    in the AWS Identity and Access Management User Guide.
	//
	// If you do not provide a key policy, AWS KMS attaches a default key policy
	// to the CMK. For more information, see Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default)
	// in the AWS Key Management Service Developer Guide.
	//
	// The key policy size quota is 32 kilobytes (32768 bytes).
	Policy *string `min:"1" type:"string"`

	// One or more tags. Each tag consists of a tag key and a tag value. Both the
	// tag key and the tag value are required, but the tag value can be an empty
	// (null) string.
	//
	// When you add tags to an AWS resource, AWS generates a cost allocation report
	// with usage and costs aggregated by tags. For information about adding, changing,
	// deleting and listing tags for CMKs, see Tagging Keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html).
	//
	// Use this parameter to tag the CMK when it is created. To add tags to an existing
	// CMK, use the TagResource operation.
	Tags []*Tag `type:"list"`
	// contains filtered or unexported fields
}

func (CreateKeyInput) GoString

func (s CreateKeyInput) GoString() string

GoString returns the string representation

func (*CreateKeyInput) SetBypassPolicyLockoutSafetyCheck

func (s *CreateKeyInput) SetBypassPolicyLockoutSafetyCheck(v bool) *CreateKeyInput

SetBypassPolicyLockoutSafetyCheck sets the BypassPolicyLockoutSafetyCheck field's value.

func (*CreateKeyInput) SetCustomKeyStoreId

func (s *CreateKeyInput) SetCustomKeyStoreId(v string) *CreateKeyInput

SetCustomKeyStoreId sets the CustomKeyStoreId field's value.

func (*CreateKeyInput) SetCustomerMasterKeySpec

func (s *CreateKeyInput) SetCustomerMasterKeySpec(v string) *CreateKeyInput

SetCustomerMasterKeySpec sets the CustomerMasterKeySpec field's value.

func (*CreateKeyInput) SetDescription

func (s *CreateKeyInput) SetDescription(v string) *CreateKeyInput

SetDescription sets the Description field's value.

func (*CreateKeyInput) SetKeyUsage

func (s *CreateKeyInput) SetKeyUsage(v string) *CreateKeyInput

SetKeyUsage sets the KeyUsage field's value.

func (*CreateKeyInput) SetOrigin

func (s *CreateKeyInput) SetOrigin(v string) *CreateKeyInput

SetOrigin sets the Origin field's value.

func (*CreateKeyInput) SetPolicy

func (s *CreateKeyInput) SetPolicy(v string) *CreateKeyInput

SetPolicy sets the Policy field's value.

func (*CreateKeyInput) SetTags

func (s *CreateKeyInput) SetTags(v []*Tag) *CreateKeyInput

SetTags sets the Tags field's value.

func (CreateKeyInput) String

func (s CreateKeyInput) String() string

String returns the string representation

func (*CreateKeyInput) Validate

func (s *CreateKeyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateKeyOutput

type CreateKeyOutput struct {

	// Metadata associated with the CMK.
	KeyMetadata *KeyMetadata `type:"structure"`
	// contains filtered or unexported fields
}

func (CreateKeyOutput) GoString

func (s CreateKeyOutput) GoString() string

GoString returns the string representation

func (*CreateKeyOutput) SetKeyMetadata

func (s *CreateKeyOutput) SetKeyMetadata(v *KeyMetadata) *CreateKeyOutput

SetKeyMetadata sets the KeyMetadata field's value.

func (CreateKeyOutput) String

func (s CreateKeyOutput) String() string

String returns the string representation

type CustomKeyStoreHasCMKsException

type CustomKeyStoreHasCMKsException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the custom key store contains AWS KMS customer master keys (CMKs). After verifying that you do not need to use the CMKs, use the ScheduleKeyDeletion operation to delete the CMKs. After they are deleted, you can delete the custom key store.

func (*CustomKeyStoreHasCMKsException) Code

func (s *CustomKeyStoreHasCMKsException) Code() string

Code returns the exception type name.

func (*CustomKeyStoreHasCMKsException) Error

func (s *CustomKeyStoreHasCMKsException) Error() string

func (CustomKeyStoreHasCMKsException) GoString

func (s CustomKeyStoreHasCMKsException) GoString() string

GoString returns the string representation

func (*CustomKeyStoreHasCMKsException) Message

func (s *CustomKeyStoreHasCMKsException) Message() string

Message returns the exception's message.

func (*CustomKeyStoreHasCMKsException) OrigErr

func (s *CustomKeyStoreHasCMKsException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*CustomKeyStoreHasCMKsException) RequestID

func (s *CustomKeyStoreHasCMKsException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*CustomKeyStoreHasCMKsException) StatusCode

func (s *CustomKeyStoreHasCMKsException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (CustomKeyStoreHasCMKsException) String

func (s CustomKeyStoreHasCMKsException) String() string

String returns the string representation

type CustomKeyStoreInvalidStateException

type CustomKeyStoreInvalidStateException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because of the ConnectionState of the custom key store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores operation.

This exception is thrown under the following conditions:

* You requested the CreateKey or GenerateRandom operation in a custom
key store that is not connected. These operations are valid only when
the custom key store ConnectionState is CONNECTED.

* You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation
on a custom key store that is not disconnected. This operation is valid
only when the custom key store ConnectionState is DISCONNECTED.

* You requested the ConnectCustomKeyStore operation on a custom key store
with a ConnectionState of DISCONNECTING or FAILED. This operation is valid
for all other ConnectionState values.

func (*CustomKeyStoreInvalidStateException) Code

func (s *CustomKeyStoreInvalidStateException) Code() string

Code returns the exception type name.

func (*CustomKeyStoreInvalidStateException) Error

func (s *CustomKeyStoreInvalidStateException) Error() string

func (CustomKeyStoreInvalidStateException) GoString

func (s CustomKeyStoreInvalidStateException) GoString() string

GoString returns the string representation

func (*CustomKeyStoreInvalidStateException) Message

func (s *CustomKeyStoreInvalidStateException) Message() string

Message returns the exception's message.

func (*CustomKeyStoreInvalidStateException) OrigErr

func (s *CustomKeyStoreInvalidStateException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*CustomKeyStoreInvalidStateException) RequestID

func (s *CustomKeyStoreInvalidStateException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*CustomKeyStoreInvalidStateException) StatusCode

func (s *CustomKeyStoreInvalidStateException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (CustomKeyStoreInvalidStateException) String

func (s CustomKeyStoreInvalidStateException) String() string

String returns the string representation

type CustomKeyStoreNameInUseException

type CustomKeyStoreNameInUseException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the specified custom key store name is already assigned to another custom key store in the account. Try again with a custom key store name that is unique in the account.

func (*CustomKeyStoreNameInUseException) Code

func (s *CustomKeyStoreNameInUseException) Code() string

Code returns the exception type name.

func (*CustomKeyStoreNameInUseException) Error

func (s *CustomKeyStoreNameInUseException) Error() string

func (CustomKeyStoreNameInUseException) GoString

func (s CustomKeyStoreNameInUseException) GoString() string

GoString returns the string representation

func (*CustomKeyStoreNameInUseException) Message

func (s *CustomKeyStoreNameInUseException) Message() string

Message returns the exception's message.

func (*CustomKeyStoreNameInUseException) OrigErr

func (s *CustomKeyStoreNameInUseException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*CustomKeyStoreNameInUseException) RequestID

func (s *CustomKeyStoreNameInUseException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*CustomKeyStoreNameInUseException) StatusCode

func (s *CustomKeyStoreNameInUseException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (CustomKeyStoreNameInUseException) String

func (s CustomKeyStoreNameInUseException) String() string

String returns the string representation

type CustomKeyStoreNotFoundException

type CustomKeyStoreNotFoundException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because AWS KMS cannot find a custom key store with the specified key store name or ID.

func (*CustomKeyStoreNotFoundException) Code

func (s *CustomKeyStoreNotFoundException) Code() string

Code returns the exception type name.

func (*CustomKeyStoreNotFoundException) Error

func (s *CustomKeyStoreNotFoundException) Error() string

func (CustomKeyStoreNotFoundException) GoString

func (s CustomKeyStoreNotFoundException) GoString() string

GoString returns the string representation

func (*CustomKeyStoreNotFoundException) Message

func (s *CustomKeyStoreNotFoundException) Message() string

Message returns the exception's message.

func (*CustomKeyStoreNotFoundException) OrigErr

func (s *CustomKeyStoreNotFoundException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*CustomKeyStoreNotFoundException) RequestID

func (s *CustomKeyStoreNotFoundException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*CustomKeyStoreNotFoundException) StatusCode

func (s *CustomKeyStoreNotFoundException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (CustomKeyStoreNotFoundException) String

func (s CustomKeyStoreNotFoundException) String() string

String returns the string representation

type CustomKeyStoresListEntry

type CustomKeyStoresListEntry struct {

	// A unique identifier for the AWS CloudHSM cluster that is associated with
	// the custom key store.
	CloudHsmClusterId *string `min:"19" type:"string"`

	// Describes the connection error. This field appears in the response only when
	// the ConnectionState is FAILED. For help resolving these errors, see How to
	// Fix a Connection Failure (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-failed)
	// in AWS Key Management Service Developer Guide.
	//
	// Valid values are:
	//
	//    * CLUSTER_NOT_FOUND - AWS KMS cannot find the AWS CloudHSM cluster with
	//    the specified cluster ID.
	//
	//    * INSUFFICIENT_CLOUDHSM_HSMS - The associated AWS CloudHSM cluster does
	//    not contain any active HSMs. To connect a custom key store to its AWS
	//    CloudHSM cluster, the cluster must contain at least one active HSM.
	//
	//    * INTERNAL_ERROR - AWS KMS could not complete the request due to an internal
	//    error. Retry the request. For ConnectCustomKeyStore requests, disconnect
	//    the custom key store before trying to connect again.
	//
	//    * INVALID_CREDENTIALS - AWS KMS does not have the correct password for
	//    the kmsuser crypto user in the AWS CloudHSM cluster. Before you can connect
	//    your custom key store to its AWS CloudHSM cluster, you must change the
	//    kmsuser account password and update the key store password value for the
	//    custom key store.
	//
	//    * NETWORK_ERRORS - Network errors are preventing AWS KMS from connecting
	//    to the custom key store.
	//
	//    * SUBNET_NOT_FOUND - A subnet in the AWS CloudHSM cluster configuration
	//    was deleted. If AWS KMS cannot find all of the subnets in the cluster
	//    configuration, attempts to connect the custom key store to the AWS CloudHSM
	//    cluster fail. To fix this error, create a cluster from a recent backup
	//    and associate it with your custom key store. (This process creates a new
	//    cluster configuration with a VPC and private subnets.) For details, see
	//    How to Fix a Connection Failure (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-failed)
	//    in the AWS Key Management Service Developer Guide.
	//
	//    * USER_LOCKED_OUT - The kmsuser CU account is locked out of the associated
	//    AWS CloudHSM cluster due to too many failed password attempts. Before
	//    you can connect your custom key store to its AWS CloudHSM cluster, you
	//    must change the kmsuser account password and update the key store password
	//    value for the custom key store.
	//
	//    * USER_LOGGED_IN - The kmsuser CU account is logged into the the associated
	//    AWS CloudHSM cluster. This prevents AWS KMS from rotating the kmsuser
	//    account password and logging into the cluster. Before you can connect
	//    your custom key store to its AWS CloudHSM cluster, you must log the kmsuser
	//    CU out of the cluster. If you changed the kmsuser password to log into
	//    the cluster, you must also and update the key store password value for
	//    the custom key store. For help, see How to Log Out and Reconnect (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#login-kmsuser-2)
	//    in the AWS Key Management Service Developer Guide.
	//
	//    * USER_NOT_FOUND - AWS KMS cannot find a kmsuser CU account in the associated
	//    AWS CloudHSM cluster. Before you can connect your custom key store to
	//    its AWS CloudHSM cluster, you must create a kmsuser CU account in the
	//    cluster, and then update the key store password value for the custom key
	//    store.
	ConnectionErrorCode *string `type:"string" enum:"ConnectionErrorCodeType"`

	// Indicates whether the custom key store is connected to its AWS CloudHSM cluster.
	//
	// You can create and use CMKs in your custom key stores only when its connection
	// state is CONNECTED.
	//
	// The value is DISCONNECTED if the key store has never been connected or you
	// use the DisconnectCustomKeyStore operation to disconnect it. If the value
	// is CONNECTED but you are having trouble using the custom key store, make
	// sure that its associated AWS CloudHSM cluster is active and contains at least
	// one active HSM.
	//
	// A value of FAILED indicates that an attempt to connect was unsuccessful.
	// The ConnectionErrorCode field in the response indicates the cause of the
	// failure. For help resolving a connection failure, see Troubleshooting a Custom
	// Key Store (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html)
	// in the AWS Key Management Service Developer Guide.
	ConnectionState *string `type:"string" enum:"ConnectionStateType"`

	// The date and time when the custom key store was created.
	CreationDate *time.Time `type:"timestamp"`

	// A unique identifier for the custom key store.
	CustomKeyStoreId *string `min:"1" type:"string"`

	// The user-specified friendly name for the custom key store.
	CustomKeyStoreName *string `min:"1" type:"string"`

	// The trust anchor certificate of the associated AWS CloudHSM cluster. When
	// you initialize the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr),
	// you create this certificate and save it in the customerCA.crt file.
	TrustAnchorCertificate *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

Contains information about each custom key store in the custom key store list.

func (CustomKeyStoresListEntry) GoString

func (s CustomKeyStoresListEntry) GoString() string

GoString returns the string representation

func (*CustomKeyStoresListEntry) SetCloudHsmClusterId

func (s *CustomKeyStoresListEntry) SetCloudHsmClusterId(v string) *CustomKeyStoresListEntry

SetCloudHsmClusterId sets the CloudHsmClusterId field's value.

func (*CustomKeyStoresListEntry) SetConnectionErrorCode

func (s *CustomKeyStoresListEntry) SetConnectionErrorCode(v string) *CustomKeyStoresListEntry

SetConnectionErrorCode sets the ConnectionErrorCode field's value.

func (*CustomKeyStoresListEntry) SetConnectionState

func (s *CustomKeyStoresListEntry) SetConnectionState(v string) *CustomKeyStoresListEntry

SetConnectionState sets the ConnectionState field's value.

func (*CustomKeyStoresListEntry) SetCreationDate

func (s *CustomKeyStoresListEntry) SetCreationDate(v time.Time) *CustomKeyStoresListEntry

SetCreationDate sets the CreationDate field's value.

func (*CustomKeyStoresListEntry) SetCustomKeyStoreId

func (s *CustomKeyStoresListEntry) SetCustomKeyStoreId(v string) *CustomKeyStoresListEntry

SetCustomKeyStoreId sets the CustomKeyStoreId field's value.

func (*CustomKeyStoresListEntry) SetCustomKeyStoreName

func (s *CustomKeyStoresListEntry) SetCustomKeyStoreName(v string) *CustomKeyStoresListEntry

SetCustomKeyStoreName sets the CustomKeyStoreName field's value.

func (*CustomKeyStoresListEntry) SetTrustAnchorCertificate

func (s *CustomKeyStoresListEntry) SetTrustAnchorCertificate(v string) *CustomKeyStoresListEntry

SetTrustAnchorCertificate sets the TrustAnchorCertificate field's value.

func (CustomKeyStoresListEntry) String

func (s CustomKeyStoresListEntry) String() string

String returns the string representation

type DecryptInput

type DecryptInput struct {

	// Ciphertext to be decrypted. The blob includes metadata.
	//
	// CiphertextBlob is automatically base64 encoded/decoded by the SDK.
	//
	// CiphertextBlob is a required field
	CiphertextBlob []byte `min:"1" type:"blob" required:"true"`

	// Specifies the encryption algorithm that will be used to decrypt the ciphertext.
	// Specify the same algorithm that was used to encrypt the data. If you specify
	// a different algorithm, the Decrypt operation fails.
	//
	// This parameter is required only when the ciphertext was encrypted under an
	// asymmetric CMK. The default value, SYMMETRIC_DEFAULT, represents the only
	// supported algorithm that is valid for symmetric CMKs.
	EncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`

	// Specifies the encryption context to use when decrypting the data. An encryption
	// context is valid only for cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
	// with a symmetric CMK. The standard asymmetric encryption algorithms that
	// AWS KMS uses do not support an encryption context.
	//
	// An encryption context is a collection of non-secret key-value pairs that
	// represents additional authenticated data. When you use an encryption context
	// to encrypt data, you must specify the same (an exact case-sensitive match)
	// encryption context to decrypt the data. An encryption context is optional
	// when encrypting with a symmetric CMK, but it is highly recommended.
	//
	// For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
	// in the AWS Key Management Service Developer Guide.
	EncryptionContext map[string]*string `type:"map"`

	// A list of grant tokens.
	//
	// For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
	// in the AWS Key Management Service Developer Guide.
	GrantTokens []*string `type:"list"`

	// Specifies the customer master key (CMK) that AWS KMS will use to decrypt
	// the ciphertext. Enter a key ID of the CMK that was used to encrypt the ciphertext.
	//
	// If you specify a KeyId value, the Decrypt operation succeeds only if the
	// specified CMK was used to encrypt the ciphertext.
	//
	// This parameter is required only when the ciphertext was encrypted under an
	// asymmetric CMK. Otherwise, AWS KMS uses the metadata that it adds to the
	// ciphertext blob to determine which CMK was used to encrypt the ciphertext.
	// However, you can use this parameter to ensure that a particular CMK (of any
	// kind) is used to decrypt the ciphertext.
	//
	// To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
	// or alias ARN. When using an alias name, prefix it with "alias/".
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Alias name: alias/ExampleAlias
	//
	//    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To
	// get the alias name and alias ARN, use ListAliases.
	KeyId *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (DecryptInput) GoString

func (s DecryptInput) GoString() string

GoString returns the string representation

func (*DecryptInput) SetCiphertextBlob

func (s *DecryptInput) SetCiphertextBlob(v []byte) *DecryptInput

SetCiphertextBlob sets the CiphertextBlob field's value.

func (*DecryptInput) SetEncryptionAlgorithm

func (s *DecryptInput) SetEncryptionAlgorithm(v string) *DecryptInput

SetEncryptionAlgorithm sets the EncryptionAlgorithm field's value.

func (*DecryptInput) SetEncryptionContext

func (s *DecryptInput) SetEncryptionContext(v map[string]*string) *DecryptInput

SetEncryptionContext sets the EncryptionContext field's value.

func (*DecryptInput) SetGrantTokens

func (s *DecryptInput) SetGrantTokens(v []*string) *DecryptInput

SetGrantTokens sets the GrantTokens field's value.

func (*DecryptInput) SetKeyId

func (s *DecryptInput) SetKeyId(v string) *DecryptInput

SetKeyId sets the KeyId field's value.

func (DecryptInput) String

func (s DecryptInput) String() string

String returns the string representation

func (*DecryptInput) Validate

func (s *DecryptInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DecryptOutput

type DecryptOutput struct {

	// The encryption algorithm that was used to decrypt the ciphertext.
	EncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`

	// The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
	// of the CMK that was used to decrypt the ciphertext.
	KeyId *string `min:"1" type:"string"`

	// Decrypted plaintext data. When you use the HTTP API or the AWS CLI, the value
	// is Base64-encoded. Otherwise, it is not Base64-encoded.
	//
	// Plaintext is automatically base64 encoded/decoded by the SDK.
	Plaintext []byte `min:"1" type:"blob" sensitive:"true"`
	// contains filtered or unexported fields
}

func (DecryptOutput) GoString

func (s DecryptOutput) GoString() string

GoString returns the string representation

func (*DecryptOutput) SetEncryptionAlgorithm

func (s *DecryptOutput) SetEncryptionAlgorithm(v string) *DecryptOutput

SetEncryptionAlgorithm sets the EncryptionAlgorithm field's value.

func (*DecryptOutput) SetKeyId

func (s *DecryptOutput) SetKeyId(v string) *DecryptOutput

SetKeyId sets the KeyId field's value.

func (*DecryptOutput) SetPlaintext

func (s *DecryptOutput) SetPlaintext(v []byte) *DecryptOutput

SetPlaintext sets the Plaintext field's value.

func (DecryptOutput) String

func (s DecryptOutput) String() string

String returns the string representation

type DeleteAliasInput

type DeleteAliasInput struct {

	// The alias to be deleted. The alias name must begin with alias/ followed by
	// the alias name, such as alias/ExampleAlias.
	//
	// AliasName is a required field
	AliasName *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteAliasInput) GoString

func (s DeleteAliasInput) GoString() string

GoString returns the string representation

func (*DeleteAliasInput) SetAliasName

func (s *DeleteAliasInput) SetAliasName(v string) *DeleteAliasInput

SetAliasName sets the AliasName field's value.

func (DeleteAliasInput) String

func (s DeleteAliasInput) String() string

String returns the string representation

func (*DeleteAliasInput) Validate

func (s *DeleteAliasInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteAliasOutput

type DeleteAliasOutput struct {
	// contains filtered or unexported fields
}

func (DeleteAliasOutput) GoString

func (s DeleteAliasOutput) GoString() string

GoString returns the string representation

func (DeleteAliasOutput) String

func (s DeleteAliasOutput) String() string

String returns the string representation

type DeleteCustomKeyStoreInput

type DeleteCustomKeyStoreInput struct {

	// Enter the ID of the custom key store you want to delete. To find the ID of
	// a custom key store, use the DescribeCustomKeyStores operation.
	//
	// CustomKeyStoreId is a required field
	CustomKeyStoreId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteCustomKeyStoreInput) GoString

func (s DeleteCustomKeyStoreInput) GoString() string

GoString returns the string representation

func (*DeleteCustomKeyStoreInput) SetCustomKeyStoreId

func (s *DeleteCustomKeyStoreInput) SetCustomKeyStoreId(v string) *DeleteCustomKeyStoreInput

SetCustomKeyStoreId sets the CustomKeyStoreId field's value.

func (DeleteCustomKeyStoreInput) String

func (s DeleteCustomKeyStoreInput) String() string

String returns the string representation

func (*DeleteCustomKeyStoreInput) Validate

func (s *DeleteCustomKeyStoreInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteCustomKeyStoreOutput

type DeleteCustomKeyStoreOutput struct {
	// contains filtered or unexported fields
}

func (DeleteCustomKeyStoreOutput) GoString

func (s DeleteCustomKeyStoreOutput) GoString() string

GoString returns the string representation

func (DeleteCustomKeyStoreOutput) String

func (s DeleteCustomKeyStoreOutput) String() string

String returns the string representation

type DeleteImportedKeyMaterialInput

type DeleteImportedKeyMaterialInput struct {

	// Identifies the CMK from which you are deleting imported key material. The
	// Origin of the CMK must be EXTERNAL.
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteImportedKeyMaterialInput) GoString

func (s DeleteImportedKeyMaterialInput) GoString() string

GoString returns the string representation

func (*DeleteImportedKeyMaterialInput) SetKeyId

func (s *DeleteImportedKeyMaterialInput) SetKeyId(v string) *DeleteImportedKeyMaterialInput

SetKeyId sets the KeyId field's value.

func (DeleteImportedKeyMaterialInput) String

func (s DeleteImportedKeyMaterialInput) String() string

String returns the string representation

func (*DeleteImportedKeyMaterialInput) Validate

func (s *DeleteImportedKeyMaterialInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteImportedKeyMaterialOutput

type DeleteImportedKeyMaterialOutput struct {
	// contains filtered or unexported fields
}

func (DeleteImportedKeyMaterialOutput) GoString

func (s DeleteImportedKeyMaterialOutput) GoString() string

GoString returns the string representation

func (DeleteImportedKeyMaterialOutput) String

func (s DeleteImportedKeyMaterialOutput) String() string

String returns the string representation

type DependencyTimeoutException

type DependencyTimeoutException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The system timed out while trying to fulfill the request. The request can be retried.

func (*DependencyTimeoutException) Code

func (s *DependencyTimeoutException) Code() string

Code returns the exception type name.

func (*DependencyTimeoutException) Error

func (s *DependencyTimeoutException) Error() string

func (DependencyTimeoutException) GoString

func (s DependencyTimeoutException) GoString() string

GoString returns the string representation

func (*DependencyTimeoutException) Message

func (s *DependencyTimeoutException) Message() string

Message returns the exception's message.

func (*DependencyTimeoutException) OrigErr

func (s *DependencyTimeoutException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*DependencyTimeoutException) RequestID

func (s *DependencyTimeoutException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*DependencyTimeoutException) StatusCode

func (s *DependencyTimeoutException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (DependencyTimeoutException) String

func (s DependencyTimeoutException) String() string

String returns the string representation

type DescribeCustomKeyStoresInput

type DescribeCustomKeyStoresInput struct {

	// Gets only information about the specified custom key store. Enter the key
	// store ID.
	//
	// By default, this operation gets information about all custom key stores in
	// the account and region. To limit the output to a particular custom key store,
	// you can use either the CustomKeyStoreId or CustomKeyStoreName parameter,
	// but not both.
	CustomKeyStoreId *string `min:"1" type:"string"`

	// Gets only information about the specified custom key store. Enter the friendly
	// name of the custom key store.
	//
	// By default, this operation gets information about all custom key stores in
	// the account and region. To limit the output to a particular custom key store,
	// you can use either the CustomKeyStoreId or CustomKeyStoreName parameter,
	// but not both.
	CustomKeyStoreName *string `min:"1" type:"string"`

	// Use this parameter to specify the maximum number of items to return. When
	// this value is present, AWS KMS does not return more than the specified number
	// of items, but it might return fewer.
	Limit *int64 `min:"1" type:"integer"`

	// Use this parameter in a subsequent request after you receive a response with
	// truncated results. Set it to the value of NextMarker from the truncated response
	// you just received.
	Marker *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (DescribeCustomKeyStoresInput) GoString

func (s DescribeCustomKeyStoresInput) GoString() string

GoString returns the string representation

func (*DescribeCustomKeyStoresInput) SetCustomKeyStoreId

func (s *DescribeCustomKeyStoresInput) SetCustomKeyStoreId(v string) *DescribeCustomKeyStoresInput

SetCustomKeyStoreId sets the CustomKeyStoreId field's value.

func (*DescribeCustomKeyStoresInput) SetCustomKeyStoreName

func (s *DescribeCustomKeyStoresInput) SetCustomKeyStoreName(v string) *DescribeCustomKeyStoresInput

SetCustomKeyStoreName sets the CustomKeyStoreName field's value.

func (*DescribeCustomKeyStoresInput) SetLimit

func (s *DescribeCustomKeyStoresInput) SetLimit(v int64) *DescribeCustomKeyStoresInput

SetLimit sets the Limit field's value.

func (*DescribeCustomKeyStoresInput) SetMarker

func (s *DescribeCustomKeyStoresInput) SetMarker(v string) *DescribeCustomKeyStoresInput

SetMarker sets the Marker field's value.

func (DescribeCustomKeyStoresInput) String

func (s DescribeCustomKeyStoresInput) String() string

String returns the string representation

func (*DescribeCustomKeyStoresInput) Validate

func (s *DescribeCustomKeyStoresInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeCustomKeyStoresOutput

type DescribeCustomKeyStoresOutput struct {

	// Contains metadata about each custom key store.
	CustomKeyStores []*CustomKeyStoresListEntry `type:"list"`

	// When Truncated is true, this element is present and contains the value to
	// use for the Marker parameter in a subsequent request.
	NextMarker *string `min:"1" type:"string"`

	// A flag that indicates whether there are more items in the list. When this
	// value is true, the list in this response is truncated. To get more items,
	// pass the value of the NextMarker element in thisresponse to the Marker parameter
	// in a subsequent request.
	Truncated *bool `type:"boolean"`
	// contains filtered or unexported fields
}

func (DescribeCustomKeyStoresOutput) GoString

func (s DescribeCustomKeyStoresOutput) GoString() string

GoString returns the string representation

func (*DescribeCustomKeyStoresOutput) SetCustomKeyStores

func (s *DescribeCustomKeyStoresOutput) SetCustomKeyStores(v []*CustomKeyStoresListEntry) *DescribeCustomKeyStoresOutput

SetCustomKeyStores sets the CustomKeyStores field's value.

func (*DescribeCustomKeyStoresOutput) SetNextMarker

func (s *DescribeCustomKeyStoresOutput) SetNextMarker(v string) *DescribeCustomKeyStoresOutput

SetNextMarker sets the NextMarker field's value.

func (*DescribeCustomKeyStoresOutput) SetTruncated

func (s *DescribeCustomKeyStoresOutput) SetTruncated(v bool) *DescribeCustomKeyStoresOutput

SetTruncated sets the Truncated field's value.

func (DescribeCustomKeyStoresOutput) String

func (s DescribeCustomKeyStoresOutput) String() string

String returns the string representation

type DescribeKeyInput

type DescribeKeyInput struct {

	// A list of grant tokens.
	//
	// For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
	// in the AWS Key Management Service Developer Guide.
	GrantTokens []*string `type:"list"`

	// Describes the specified customer master key (CMK).
	//
	// If you specify a predefined AWS alias (an AWS alias with no key ID), KMS
	// associates the alias with an AWS managed CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys)
	// and returns its KeyId and Arn in the response.
	//
	// To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
	// or alias ARN. When using an alias name, prefix it with "alias/". To specify
	// a CMK in a different AWS account, you must use the key ARN or alias ARN.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Alias name: alias/ExampleAlias
	//
	//    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To
	// get the alias name and alias ARN, use ListAliases.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DescribeKeyInput) GoString

func (s DescribeKeyInput) GoString() string

GoString returns the string representation

func (*DescribeKeyInput) SetGrantTokens

func (s *DescribeKeyInput) SetGrantTokens(v []*string) *DescribeKeyInput

SetGrantTokens sets the GrantTokens field's value.

func (*DescribeKeyInput) SetKeyId

func (s *DescribeKeyInput) SetKeyId(v string) *DescribeKeyInput

SetKeyId sets the KeyId field's value.

func (DescribeKeyInput) String

func (s DescribeKeyInput) String() string

String returns the string representation

func (*DescribeKeyInput) Validate

func (s *DescribeKeyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeKeyOutput

type DescribeKeyOutput struct {

	// Metadata associated with the key.
	KeyMetadata *KeyMetadata `type:"structure"`
	// contains filtered or unexported fields
}

func (DescribeKeyOutput) GoString

func (s DescribeKeyOutput) GoString() string

GoString returns the string representation

func (*DescribeKeyOutput) SetKeyMetadata

func (s *DescribeKeyOutput) SetKeyMetadata(v *KeyMetadata) *DescribeKeyOutput

SetKeyMetadata sets the KeyMetadata field's value.

func (DescribeKeyOutput) String

func (s DescribeKeyOutput) String() string

String returns the string representation

type DisableKeyInput

type DisableKeyInput struct {

	// A unique identifier for the customer master key (CMK).
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DisableKeyInput) GoString

func (s DisableKeyInput) GoString() string

GoString returns the string representation

func (*DisableKeyInput) SetKeyId

func (s *DisableKeyInput) SetKeyId(v string) *DisableKeyInput

SetKeyId sets the KeyId field's value.

func (DisableKeyInput) String

func (s DisableKeyInput) String() string

String returns the string representation

func (*DisableKeyInput) Validate

func (s *DisableKeyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DisableKeyOutput

type DisableKeyOutput struct {
	// contains filtered or unexported fields
}

func (DisableKeyOutput) GoString

func (s DisableKeyOutput) GoString() string

GoString returns the string representation

func (DisableKeyOutput) String

func (s DisableKeyOutput) String() string

String returns the string representation

type DisableKeyRotationInput

type DisableKeyRotationInput struct {

	// Identifies a symmetric customer master key (CMK). You cannot enable automatic
	// rotation of asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html#asymmetric-cmks),
	// CMKs with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html),
	// or CMKs in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DisableKeyRotationInput) GoString

func (s DisableKeyRotationInput) GoString() string

GoString returns the string representation

func (*DisableKeyRotationInput) SetKeyId

func (s *DisableKeyRotationInput) SetKeyId(v string) *DisableKeyRotationInput

SetKeyId sets the KeyId field's value.

func (DisableKeyRotationInput) String

func (s DisableKeyRotationInput) String() string

String returns the string representation

func (*DisableKeyRotationInput) Validate

func (s *DisableKeyRotationInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DisableKeyRotationOutput

type DisableKeyRotationOutput struct {
	// contains filtered or unexported fields
}

func (DisableKeyRotationOutput) GoString

func (s DisableKeyRotationOutput) GoString() string

GoString returns the string representation

func (DisableKeyRotationOutput) String

func (s DisableKeyRotationOutput) String() string

String returns the string representation

type DisabledException

type DisabledException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the specified CMK is not enabled.

func (*DisabledException) Code

func (s *DisabledException) Code() string

Code returns the exception type name.

func (*DisabledException) Error

func (s *DisabledException) Error() string

func (DisabledException) GoString

func (s DisabledException) GoString() string

GoString returns the string representation

func (*DisabledException) Message

func (s *DisabledException) Message() string

Message returns the exception's message.

func (*DisabledException) OrigErr

func (s *DisabledException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*DisabledException) RequestID

func (s *DisabledException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*DisabledException) StatusCode

func (s *DisabledException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (DisabledException) String

func (s DisabledException) String() string

String returns the string representation

type DisconnectCustomKeyStoreInput

type DisconnectCustomKeyStoreInput struct {

	// Enter the ID of the custom key store you want to disconnect. To find the
	// ID of a custom key store, use the DescribeCustomKeyStores operation.
	//
	// CustomKeyStoreId is a required field
	CustomKeyStoreId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DisconnectCustomKeyStoreInput) GoString

func (s DisconnectCustomKeyStoreInput) GoString() string

GoString returns the string representation

func (*DisconnectCustomKeyStoreInput) SetCustomKeyStoreId

func (s *DisconnectCustomKeyStoreInput) SetCustomKeyStoreId(v string) *DisconnectCustomKeyStoreInput

SetCustomKeyStoreId sets the CustomKeyStoreId field's value.

func (DisconnectCustomKeyStoreInput) String

func (s DisconnectCustomKeyStoreInput) String() string

String returns the string representation

func (*DisconnectCustomKeyStoreInput) Validate

func (s *DisconnectCustomKeyStoreInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DisconnectCustomKeyStoreOutput

type DisconnectCustomKeyStoreOutput struct {
	// contains filtered or unexported fields
}

func (DisconnectCustomKeyStoreOutput) GoString

func (s DisconnectCustomKeyStoreOutput) GoString() string

GoString returns the string representation

func (DisconnectCustomKeyStoreOutput) String

func (s DisconnectCustomKeyStoreOutput) String() string

String returns the string representation

type EnableKeyInput

type EnableKeyInput struct {

	// A unique identifier for the customer master key (CMK).
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (EnableKeyInput) GoString

func (s EnableKeyInput) GoString() string

GoString returns the string representation

func (*EnableKeyInput) SetKeyId

func (s *EnableKeyInput) SetKeyId(v string) *EnableKeyInput

SetKeyId sets the KeyId field's value.

func (EnableKeyInput) String

func (s EnableKeyInput) String() string

String returns the string representation

func (*EnableKeyInput) Validate

func (s *EnableKeyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type EnableKeyOutput

type EnableKeyOutput struct {
	// contains filtered or unexported fields
}

func (EnableKeyOutput) GoString

func (s EnableKeyOutput) GoString() string

GoString returns the string representation

func (EnableKeyOutput) String

func (s EnableKeyOutput) String() string

String returns the string representation

type EnableKeyRotationInput

type EnableKeyRotationInput struct {

	// Identifies a symmetric customer master key (CMK). You cannot enable automatic
	// rotation of asymmetric CMKs, CMKs with imported key material, or CMKs in
	// a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (EnableKeyRotationInput) GoString

func (s EnableKeyRotationInput) GoString() string

GoString returns the string representation

func (*EnableKeyRotationInput) SetKeyId

func (s *EnableKeyRotationInput) SetKeyId(v string) *EnableKeyRotationInput

SetKeyId sets the KeyId field's value.

func (EnableKeyRotationInput) String

func (s EnableKeyRotationInput) String() string

String returns the string representation

func (*EnableKeyRotationInput) Validate

func (s *EnableKeyRotationInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type EnableKeyRotationOutput

type EnableKeyRotationOutput struct {
	// contains filtered or unexported fields
}

func (EnableKeyRotationOutput) GoString

func (s EnableKeyRotationOutput) GoString() string

GoString returns the string representation

func (EnableKeyRotationOutput) String

func (s EnableKeyRotationOutput) String() string

String returns the string representation

type EncryptInput

type EncryptInput struct {

	// Specifies the encryption algorithm that AWS KMS will use to encrypt the plaintext
	// message. The algorithm must be compatible with the CMK that you specify.
	//
	// This parameter is required only for asymmetric CMKs. The default value, SYMMETRIC_DEFAULT,
	// is the algorithm used for symmetric CMKs. If you are using an asymmetric
	// CMK, we recommend RSAES_OAEP_SHA_256.
	EncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`

	// Specifies the encryption context that will be used to encrypt the data. An
	// encryption context is valid only for cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
	// with a symmetric CMK. The standard asymmetric encryption algorithms that
	// AWS KMS uses do not support an encryption context.
	//
	// An encryption context is a collection of non-secret key-value pairs that
	// represents additional authenticated data. When you use an encryption context
	// to encrypt data, you must specify the same (an exact case-sensitive match)
	// encryption context to decrypt the data. An encryption context is optional
	// when encrypting with a symmetric CMK, but it is highly recommended.
	//
	// For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
	// in the AWS Key Management Service Developer Guide.
	EncryptionContext map[string]*string `type:"map"`

	// A list of grant tokens.
	//
	// For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
	// in the AWS Key Management Service Developer Guide.
	GrantTokens []*string `type:"list"`

	// A unique identifier for the customer master key (CMK).
	//
	// To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
	// or alias ARN. When using an alias name, prefix it with "alias/". To specify
	// a CMK in a different AWS account, you must use the key ARN or alias ARN.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Alias name: alias/ExampleAlias
	//
	//    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To
	// get the alias name and alias ARN, use ListAliases.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`

	// Data to be encrypted.
	//
	// Plaintext is automatically base64 encoded/decoded by the SDK.
	//
	// Plaintext is a required field
	Plaintext []byte `min:"1" type:"blob" required:"true" sensitive:"true"`
	// contains filtered or unexported fields
}

func (EncryptInput) GoString

func (s EncryptInput) GoString() string

GoString returns the string representation

func (*EncryptInput) SetEncryptionAlgorithm

func (s *EncryptInput) SetEncryptionAlgorithm(v string) *EncryptInput

SetEncryptionAlgorithm sets the EncryptionAlgorithm field's value.

func (*EncryptInput) SetEncryptionContext

func (s *EncryptInput) SetEncryptionContext(v map[string]*string) *EncryptInput

SetEncryptionContext sets the EncryptionContext field's value.

func (*EncryptInput) SetGrantTokens

func (s *EncryptInput) SetGrantTokens(v []*string) *EncryptInput

SetGrantTokens sets the GrantTokens field's value.

func (*EncryptInput) SetKeyId

func (s *EncryptInput) SetKeyId(v string) *EncryptInput

SetKeyId sets the KeyId field's value.

func (*EncryptInput) SetPlaintext

func (s *EncryptInput) SetPlaintext(v []byte) *EncryptInput

SetPlaintext sets the Plaintext field's value.

func (EncryptInput) String

func (s EncryptInput) String() string

String returns the string representation

func (*EncryptInput) Validate

func (s *EncryptInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type EncryptOutput

type EncryptOutput struct {

	// The encrypted plaintext. When you use the HTTP API or the AWS CLI, the value
	// is Base64-encoded. Otherwise, it is not Base64-encoded.
	//
	// CiphertextBlob is automatically base64 encoded/decoded by the SDK.
	CiphertextBlob []byte `min:"1" type:"blob"`

	// The encryption algorithm that was used to encrypt the plaintext.
	EncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`

	// The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
	// of the CMK that was used to encrypt the plaintext.
	KeyId *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (EncryptOutput) GoString

func (s EncryptOutput) GoString() string

GoString returns the string representation

func (*EncryptOutput) SetCiphertextBlob

func (s *EncryptOutput) SetCiphertextBlob(v []byte) *EncryptOutput

SetCiphertextBlob sets the CiphertextBlob field's value.

func (*EncryptOutput) SetEncryptionAlgorithm

func (s *EncryptOutput) SetEncryptionAlgorithm(v string) *EncryptOutput

SetEncryptionAlgorithm sets the EncryptionAlgorithm field's value.

func (*EncryptOutput) SetKeyId

func (s *EncryptOutput) SetKeyId(v string) *EncryptOutput

SetKeyId sets the KeyId field's value.

func (EncryptOutput) String

func (s EncryptOutput) String() string

String returns the string representation

type ExpiredImportTokenException

type ExpiredImportTokenException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the specified import token is expired. Use GetParametersForImport to get a new import token and public key, use the new public key to encrypt the key material, and then try the request again.

func (*ExpiredImportTokenException) Code

func (s *ExpiredImportTokenException) Code() string

Code returns the exception type name.

func (*ExpiredImportTokenException) Error

func (s *ExpiredImportTokenException) Error() string

func (ExpiredImportTokenException) GoString

func (s ExpiredImportTokenException) GoString() string

GoString returns the string representation

func (*ExpiredImportTokenException) Message

func (s *ExpiredImportTokenException) Message() string

Message returns the exception's message.

func (*ExpiredImportTokenException) OrigErr

func (s *ExpiredImportTokenException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*ExpiredImportTokenException) RequestID

func (s *ExpiredImportTokenException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*ExpiredImportTokenException) StatusCode

func (s *ExpiredImportTokenException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (ExpiredImportTokenException) String

func (s ExpiredImportTokenException) String() string

String returns the string representation

type GenerateDataKeyInput

type GenerateDataKeyInput struct {

	// Specifies the encryption context that will be used when encrypting the data
	// key.
	//
	// An encryption context is a collection of non-secret key-value pairs that
	// represents additional authenticated data. When you use an encryption context
	// to encrypt data, you must specify the same (an exact case-sensitive match)
	// encryption context to decrypt the data. An encryption context is optional
	// when encrypting with a symmetric CMK, but it is highly recommended.
	//
	// For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
	// in the AWS Key Management Service Developer Guide.
	EncryptionContext map[string]*string `type:"map"`

	// A list of grant tokens.
	//
	// For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
	// in the AWS Key Management Service Developer Guide.
	GrantTokens []*string `type:"list"`

	// Identifies the symmetric CMK that encrypts the data key.
	//
	// To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
	// or alias ARN. When using an alias name, prefix it with "alias/". To specify
	// a CMK in a different AWS account, you must use the key ARN or alias ARN.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Alias name: alias/ExampleAlias
	//
	//    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To
	// get the alias name and alias ARN, use ListAliases.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`

	// Specifies the length of the data key. Use AES_128 to generate a 128-bit symmetric
	// key, or AES_256 to generate a 256-bit symmetric key.
	//
	// You must specify either the KeySpec or the NumberOfBytes parameter (but not
	// both) in every GenerateDataKey request.
	KeySpec *string `type:"string" enum:"DataKeySpec"`

	// Specifies the length of the data key in bytes. For example, use the value
	// 64 to generate a 512-bit data key (64 bytes is 512 bits). For 128-bit (16-byte)
	// and 256-bit (32-byte) data keys, use the KeySpec parameter.
	//
	// You must specify either the KeySpec or the NumberOfBytes parameter (but not
	// both) in every GenerateDataKey request.
	NumberOfBytes *int64 `min:"1" type:"integer"`
	// contains filtered or unexported fields
}

func (GenerateDataKeyInput) GoString

func (s GenerateDataKeyInput) GoString() string

GoString returns the string representation

func (*GenerateDataKeyInput) SetEncryptionContext

func (s *GenerateDataKeyInput) SetEncryptionContext(v map[string]*string) *GenerateDataKeyInput

SetEncryptionContext sets the EncryptionContext field's value.

func (*GenerateDataKeyInput) SetGrantTokens

func (s *GenerateDataKeyInput) SetGrantTokens(v []*string) *GenerateDataKeyInput

SetGrantTokens sets the GrantTokens field's value.

func (*GenerateDataKeyInput) SetKeyId

func (s *GenerateDataKeyInput) SetKeyId(v string) *GenerateDataKeyInput

SetKeyId sets the KeyId field's value.

func (*GenerateDataKeyInput) SetKeySpec

func (s *GenerateDataKeyInput) SetKeySpec(v string) *GenerateDataKeyInput

SetKeySpec sets the KeySpec field's value.

func (*GenerateDataKeyInput) SetNumberOfBytes

func (s *GenerateDataKeyInput) SetNumberOfBytes(v int64) *GenerateDataKeyInput

SetNumberOfBytes sets the NumberOfBytes field's value.

func (GenerateDataKeyInput) String

func (s GenerateDataKeyInput) String() string

String returns the string representation

func (*GenerateDataKeyInput) Validate

func (s *GenerateDataKeyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GenerateDataKeyOutput

type GenerateDataKeyOutput struct {

	// The encrypted copy of the data key. When you use the HTTP API or the AWS
	// CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
	//
	// CiphertextBlob is automatically base64 encoded/decoded by the SDK.
	CiphertextBlob []byte `min:"1" type:"blob"`

	// The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
	// of the CMK that encrypted the data key.
	KeyId *string `min:"1" type:"string"`

	// The plaintext data key. When you use the HTTP API or the AWS CLI, the value
	// is Base64-encoded. Otherwise, it is not Base64-encoded. Use this data key
	// to encrypt your data outside of KMS. Then, remove it from memory as soon
	// as possible.
	//
	// Plaintext is automatically base64 encoded/decoded by the SDK.
	Plaintext []byte `min:"1" type:"blob" sensitive:"true"`
	// contains filtered or unexported fields
}

func (GenerateDataKeyOutput) GoString

func (s GenerateDataKeyOutput) GoString() string

GoString returns the string representation

func (*GenerateDataKeyOutput) SetCiphertextBlob

func (s *GenerateDataKeyOutput) SetCiphertextBlob(v []byte) *GenerateDataKeyOutput

SetCiphertextBlob sets the CiphertextBlob field's value.

func (*GenerateDataKeyOutput) SetKeyId

func (s *GenerateDataKeyOutput) SetKeyId(v string) *GenerateDataKeyOutput

SetKeyId sets the KeyId field's value.

func (*GenerateDataKeyOutput) SetPlaintext

func (s *GenerateDataKeyOutput) SetPlaintext(v []byte) *GenerateDataKeyOutput

SetPlaintext sets the Plaintext field's value.

func (GenerateDataKeyOutput) String

func (s GenerateDataKeyOutput) String() string

String returns the string representation

type GenerateDataKeyPairInput

type GenerateDataKeyPairInput struct {

	// Specifies the encryption context that will be used when encrypting the private
	// key in the data key pair.
	//
	// An encryption context is a collection of non-secret key-value pairs that
	// represents additional authenticated data. When you use an encryption context
	// to encrypt data, you must specify the same (an exact case-sensitive match)
	// encryption context to decrypt the data. An encryption context is optional
	// when encrypting with a symmetric CMK, but it is highly recommended.
	//
	// For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
	// in the AWS Key Management Service Developer Guide.
	EncryptionContext map[string]*string `type:"map"`

	// A list of grant tokens.
	//
	// For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
	// in the AWS Key Management Service Developer Guide.
	GrantTokens []*string `type:"list"`

	// Specifies the symmetric CMK that encrypts the private key in the data key
	// pair. You cannot specify an asymmetric CMK or a CMK in a custom key store.
	// To get the type and origin of your CMK, use the DescribeKey operation.
	//
	// To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
	// or alias ARN. When using an alias name, prefix it with "alias/". To specify
	// a CMK in a different AWS account, you must use the key ARN or alias ARN.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Alias name: alias/ExampleAlias
	//
	//    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To
	// get the alias name and alias ARN, use ListAliases.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`

	// Determines the type of data key pair that is generated.
	//
	// The AWS KMS rule that restricts the use of asymmetric RSA CMKs to encrypt
	// and decrypt or to sign and verify (but not both), and the rule that permits
	// you to use ECC CMKs only to sign and verify, are not effective outside of
	// AWS KMS.
	//
	// KeyPairSpec is a required field
	KeyPairSpec *string `type:"string" required:"true" enum:"DataKeyPairSpec"`
	// contains filtered or unexported fields
}

func (GenerateDataKeyPairInput) GoString

func (s GenerateDataKeyPairInput) GoString() string

GoString returns the string representation

func (*GenerateDataKeyPairInput) SetEncryptionContext

func (s *GenerateDataKeyPairInput) SetEncryptionContext(v map[string]*string) *GenerateDataKeyPairInput

SetEncryptionContext sets the EncryptionContext field's value.

func (*GenerateDataKeyPairInput) SetGrantTokens

func (s *GenerateDataKeyPairInput) SetGrantTokens(v []*string) *GenerateDataKeyPairInput

SetGrantTokens sets the GrantTokens field's value.

func (*GenerateDataKeyPairInput) SetKeyId

func (s *GenerateDataKeyPairInput) SetKeyId(v string) *GenerateDataKeyPairInput

SetKeyId sets the KeyId field's value.

func (*GenerateDataKeyPairInput) SetKeyPairSpec

func (s *GenerateDataKeyPairInput) SetKeyPairSpec(v string) *GenerateDataKeyPairInput

SetKeyPairSpec sets the KeyPairSpec field's value.

func (GenerateDataKeyPairInput) String

func (s GenerateDataKeyPairInput) String() string

String returns the string representation

func (*GenerateDataKeyPairInput) Validate

func (s *GenerateDataKeyPairInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GenerateDataKeyPairOutput

type GenerateDataKeyPairOutput struct {

	// The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
	// of the CMK that encrypted the private key.
	KeyId *string `min:"1" type:"string"`

	// The type of data key pair that was generated.
	KeyPairSpec *string `type:"string" enum:"DataKeyPairSpec"`

	// The encrypted copy of the private key. When you use the HTTP API or the AWS
	// CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
	//
	// PrivateKeyCiphertextBlob is automatically base64 encoded/decoded by the SDK.
	PrivateKeyCiphertextBlob []byte `min:"1" type:"blob"`

	// The plaintext copy of the private key. When you use the HTTP API or the AWS
	// CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
	//
	// PrivateKeyPlaintext is automatically base64 encoded/decoded by the SDK.
	PrivateKeyPlaintext []byte `min:"1" type:"blob" sensitive:"true"`

	// The public key (in plaintext).
	//
	// PublicKey is automatically base64 encoded/decoded by the SDK.
	PublicKey []byte `min:"1" type:"blob"`
	// contains filtered or unexported fields
}

func (GenerateDataKeyPairOutput) GoString

func (s GenerateDataKeyPairOutput) GoString() string

GoString returns the string representation

func (*GenerateDataKeyPairOutput) SetKeyId

func (s *GenerateDataKeyPairOutput) SetKeyId(v string) *GenerateDataKeyPairOutput

SetKeyId sets the KeyId field's value.

func (*GenerateDataKeyPairOutput) SetKeyPairSpec

func (s *GenerateDataKeyPairOutput) SetKeyPairSpec(v string) *GenerateDataKeyPairOutput

SetKeyPairSpec sets the KeyPairSpec field's value.

func (*GenerateDataKeyPairOutput) SetPrivateKeyCiphertextBlob

func (s *GenerateDataKeyPairOutput) SetPrivateKeyCiphertextBlob(v []byte) *GenerateDataKeyPairOutput

SetPrivateKeyCiphertextBlob sets the PrivateKeyCiphertextBlob field's value.

func (*GenerateDataKeyPairOutput) SetPrivateKeyPlaintext

func (s *GenerateDataKeyPairOutput) SetPrivateKeyPlaintext(v []byte) *GenerateDataKeyPairOutput

SetPrivateKeyPlaintext sets the PrivateKeyPlaintext field's value.

func (*GenerateDataKeyPairOutput) SetPublicKey

func (s *GenerateDataKeyPairOutput) SetPublicKey(v []byte) *GenerateDataKeyPairOutput

SetPublicKey sets the PublicKey field's value.

func (GenerateDataKeyPairOutput) String

func (s GenerateDataKeyPairOutput) String() string

String returns the string representation

type GenerateDataKeyPairWithoutPlaintextInput

type GenerateDataKeyPairWithoutPlaintextInput struct {

	// Specifies the encryption context that will be used when encrypting the private
	// key in the data key pair.
	//
	// An encryption context is a collection of non-secret key-value pairs that
	// represents additional authenticated data. When you use an encryption context
	// to encrypt data, you must specify the same (an exact case-sensitive match)
	// encryption context to decrypt the data. An encryption context is optional
	// when encrypting with a symmetric CMK, but it is highly recommended.
	//
	// For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
	// in the AWS Key Management Service Developer Guide.
	EncryptionContext map[string]*string `type:"map"`

	// A list of grant tokens.
	//
	// For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
	// in the AWS Key Management Service Developer Guide.
	GrantTokens []*string `type:"list"`

	// Specifies the CMK that encrypts the private key in the data key pair. You
	// must specify a symmetric CMK. You cannot use an asymmetric CMK or a CMK in
	// a custom key store. To get the type and origin of your CMK, use the DescribeKey
	// operation.
	//
	// To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
	// or alias ARN. When using an alias name, prefix it with "alias/".
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Alias name: alias/ExampleAlias
	//
	//    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To
	// get the alias name and alias ARN, use ListAliases.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`

	// Determines the type of data key pair that is generated.
	//
	// The AWS KMS rule that restricts the use of asymmetric RSA CMKs to encrypt
	// and decrypt or to sign and verify (but not both), and the rule that permits
	// you to use ECC CMKs only to sign and verify, are not effective outside of
	// AWS KMS.
	//
	// KeyPairSpec is a required field
	KeyPairSpec *string `type:"string" required:"true" enum:"DataKeyPairSpec"`
	// contains filtered or unexported fields
}

func (GenerateDataKeyPairWithoutPlaintextInput) GoString

func (s GenerateDataKeyPairWithoutPlaintextInput) GoString() string

GoString returns the string representation

func (*GenerateDataKeyPairWithoutPlaintextInput) SetEncryptionContext

func (s *GenerateDataKeyPairWithoutPlaintextInput) SetEncryptionContext(v map[string]*string) *GenerateDataKeyPairWithoutPlaintextInput

SetEncryptionContext sets the EncryptionContext field's value.

func (*GenerateDataKeyPairWithoutPlaintextInput) SetGrantTokens

func (s *GenerateDataKeyPairWithoutPlaintextInput) SetGrantTokens(v []*string) *GenerateDataKeyPairWithoutPlaintextInput

SetGrantTokens sets the GrantTokens field's value.

func (*GenerateDataKeyPairWithoutPlaintextInput) SetKeyId

func (s *GenerateDataKeyPairWithoutPlaintextInput) SetKeyId(v string) *GenerateDataKeyPairWithoutPlaintextInput

SetKeyId sets the KeyId field's value.

func (*GenerateDataKeyPairWithoutPlaintextInput) SetKeyPairSpec

func (s *GenerateDataKeyPairWithoutPlaintextInput) SetKeyPairSpec(v string) *GenerateDataKeyPairWithoutPlaintextInput

SetKeyPairSpec sets the KeyPairSpec field's value.

func (GenerateDataKeyPairWithoutPlaintextInput) String

func (s GenerateDataKeyPairWithoutPlaintextInput) String() string

String returns the string representation

func (*GenerateDataKeyPairWithoutPlaintextInput) Validate

func (s *GenerateDataKeyPairWithoutPlaintextInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GenerateDataKeyPairWithoutPlaintextOutput

type GenerateDataKeyPairWithoutPlaintextOutput struct {

	// The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
	// of the CMK that encrypted the private key.
	KeyId *string `min:"1" type:"string"`

	// The type of data key pair that was generated.
	KeyPairSpec *string `type:"string" enum:"DataKeyPairSpec"`

	// The encrypted copy of the private key. When you use the HTTP API or the AWS
	// CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
	//
	// PrivateKeyCiphertextBlob is automatically base64 encoded/decoded by the SDK.
	PrivateKeyCiphertextBlob []byte `min:"1" type:"blob"`

	// The public key (in plaintext).
	//
	// PublicKey is automatically base64 encoded/decoded by the SDK.
	PublicKey []byte `min:"1" type:"blob"`
	// contains filtered or unexported fields
}

func (GenerateDataKeyPairWithoutPlaintextOutput) GoString

func (s GenerateDataKeyPairWithoutPlaintextOutput) GoString() string

GoString returns the string representation

func (*GenerateDataKeyPairWithoutPlaintextOutput) SetKeyId

func (s *GenerateDataKeyPairWithoutPlaintextOutput) SetKeyId(v string) *GenerateDataKeyPairWithoutPlaintextOutput

SetKeyId sets the KeyId field's value.

func (*GenerateDataKeyPairWithoutPlaintextOutput) SetKeyPairSpec

func (s *GenerateDataKeyPairWithoutPlaintextOutput) SetKeyPairSpec(v string) *GenerateDataKeyPairWithoutPlaintextOutput

SetKeyPairSpec sets the KeyPairSpec field's value.

func (*GenerateDataKeyPairWithoutPlaintextOutput) SetPrivateKeyCiphertextBlob

func (s *GenerateDataKeyPairWithoutPlaintextOutput) SetPrivateKeyCiphertextBlob(v []byte) *GenerateDataKeyPairWithoutPlaintextOutput

SetPrivateKeyCiphertextBlob sets the PrivateKeyCiphertextBlob field's value.

func (*GenerateDataKeyPairWithoutPlaintextOutput) SetPublicKey

func (s *GenerateDataKeyPairWithoutPlaintextOutput) SetPublicKey(v []byte) *GenerateDataKeyPairWithoutPlaintextOutput

SetPublicKey sets the PublicKey field's value.

func (GenerateDataKeyPairWithoutPlaintextOutput) String

func (s GenerateDataKeyPairWithoutPlaintextOutput) String() string

String returns the string representation

type GenerateDataKeyWithoutPlaintextInput

type GenerateDataKeyWithoutPlaintextInput struct {

	// Specifies the encryption context that will be used when encrypting the data
	// key.
	//
	// An encryption context is a collection of non-secret key-value pairs that
	// represents additional authenticated data. When you use an encryption context
	// to encrypt data, you must specify the same (an exact case-sensitive match)
	// encryption context to decrypt the data. An encryption context is optional
	// when encrypting with a symmetric CMK, but it is highly recommended.
	//
	// For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
	// in the AWS Key Management Service Developer Guide.
	EncryptionContext map[string]*string `type:"map"`

	// A list of grant tokens.
	//
	// For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
	// in the AWS Key Management Service Developer Guide.
	GrantTokens []*string `type:"list"`

	// The identifier of the symmetric customer master key (CMK) that encrypts the
	// data key.
	//
	// To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
	// or alias ARN. When using an alias name, prefix it with "alias/". To specify
	// a CMK in a different AWS account, you must use the key ARN or alias ARN.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Alias name: alias/ExampleAlias
	//
	//    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To
	// get the alias name and alias ARN, use ListAliases.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`

	// The length of the data key. Use AES_128 to generate a 128-bit symmetric key,
	// or AES_256 to generate a 256-bit symmetric key.
	KeySpec *string `type:"string" enum:"DataKeySpec"`

	// The length of the data key in bytes. For example, use the value 64 to generate
	// a 512-bit data key (64 bytes is 512 bits). For common key lengths (128-bit
	// and 256-bit symmetric keys), we recommend that you use the KeySpec field
	// instead of this one.
	NumberOfBytes *int64 `min:"1" type:"integer"`
	// contains filtered or unexported fields
}

func (GenerateDataKeyWithoutPlaintextInput) GoString

func (s GenerateDataKeyWithoutPlaintextInput) GoString() string

GoString returns the string representation

func (*GenerateDataKeyWithoutPlaintextInput) SetEncryptionContext

func (s *GenerateDataKeyWithoutPlaintextInput) SetEncryptionContext(v map[string]*string) *GenerateDataKeyWithoutPlaintextInput

SetEncryptionContext sets the EncryptionContext field's value.

func (*GenerateDataKeyWithoutPlaintextInput) SetGrantTokens

func (s *GenerateDataKeyWithoutPlaintextInput) SetGrantTokens(v []*string) *GenerateDataKeyWithoutPlaintextInput

SetGrantTokens sets the GrantTokens field's value.

func (*GenerateDataKeyWithoutPlaintextInput) SetKeyId

func (s *GenerateDataKeyWithoutPlaintextInput) SetKeyId(v string) *GenerateDataKeyWithoutPlaintextInput

SetKeyId sets the KeyId field's value.

func (*GenerateDataKeyWithoutPlaintextInput) SetKeySpec

func (s *GenerateDataKeyWithoutPlaintextInput) SetKeySpec(v string) *GenerateDataKeyWithoutPlaintextInput

SetKeySpec sets the KeySpec field's value.

func (*GenerateDataKeyWithoutPlaintextInput) SetNumberOfBytes

func (s *GenerateDataKeyWithoutPlaintextInput) SetNumberOfBytes(v int64) *GenerateDataKeyWithoutPlaintextInput

SetNumberOfBytes sets the NumberOfBytes field's value.

func (GenerateDataKeyWithoutPlaintextInput) String

func (s GenerateDataKeyWithoutPlaintextInput) String() string

String returns the string representation

func (*GenerateDataKeyWithoutPlaintextInput) Validate

func (s *GenerateDataKeyWithoutPlaintextInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GenerateDataKeyWithoutPlaintextOutput

type GenerateDataKeyWithoutPlaintextOutput struct {

	// The encrypted data key. When you use the HTTP API or the AWS CLI, the value
	// is Base64-encoded. Otherwise, it is not Base64-encoded.
	//
	// CiphertextBlob is automatically base64 encoded/decoded by the SDK.
	CiphertextBlob []byte `min:"1" type:"blob"`

	// The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
	// of the CMK that encrypted the data key.
	KeyId *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (GenerateDataKeyWithoutPlaintextOutput) GoString

func (s GenerateDataKeyWithoutPlaintextOutput) GoString() string

GoString returns the string representation

func (*GenerateDataKeyWithoutPlaintextOutput) SetCiphertextBlob

func (s *GenerateDataKeyWithoutPlaintextOutput) SetCiphertextBlob(v []byte) *GenerateDataKeyWithoutPlaintextOutput

SetCiphertextBlob sets the CiphertextBlob field's value.

func (*GenerateDataKeyWithoutPlaintextOutput) SetKeyId

func (s *GenerateDataKeyWithoutPlaintextOutput) SetKeyId(v string) *GenerateDataKeyWithoutPlaintextOutput

SetKeyId sets the KeyId field's value.

func (GenerateDataKeyWithoutPlaintextOutput) String

func (s GenerateDataKeyWithoutPlaintextOutput) String() string

String returns the string representation

type GenerateRandomInput

type GenerateRandomInput struct {

	// Generates the random byte string in the AWS CloudHSM cluster that is associated
	// with the specified custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
	// To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
	CustomKeyStoreId *string `min:"1" type:"string"`

	// The length of the byte string.
	NumberOfBytes *int64 `min:"1" type:"integer"`
	// contains filtered or unexported fields
}

func (GenerateRandomInput) GoString

func (s GenerateRandomInput) GoString() string

GoString returns the string representation

func (*GenerateRandomInput) SetCustomKeyStoreId

func (s *GenerateRandomInput) SetCustomKeyStoreId(v string) *GenerateRandomInput

SetCustomKeyStoreId sets the CustomKeyStoreId field's value.

func (*GenerateRandomInput) SetNumberOfBytes

func (s *GenerateRandomInput) SetNumberOfBytes(v int64) *GenerateRandomInput

SetNumberOfBytes sets the NumberOfBytes field's value.

func (GenerateRandomInput) String

func (s GenerateRandomInput) String() string

String returns the string representation

func (*GenerateRandomInput) Validate

func (s *GenerateRandomInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GenerateRandomOutput

type GenerateRandomOutput struct {

	// The random byte string. When you use the HTTP API or the AWS CLI, the value
	// is Base64-encoded. Otherwise, it is not Base64-encoded.
	//
	// Plaintext is automatically base64 encoded/decoded by the SDK.
	Plaintext []byte `min:"1" type:"blob" sensitive:"true"`
	// contains filtered or unexported fields
}

func (GenerateRandomOutput) GoString

func (s GenerateRandomOutput) GoString() string

GoString returns the string representation

func (*GenerateRandomOutput) SetPlaintext

func (s *GenerateRandomOutput) SetPlaintext(v []byte) *GenerateRandomOutput

SetPlaintext sets the Plaintext field's value.

func (GenerateRandomOutput) String

func (s GenerateRandomOutput) String() string

String returns the string representation

type GetKeyPolicyInput

type GetKeyPolicyInput struct {

	// A unique identifier for the customer master key (CMK).
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`

	// Specifies the name of the key policy. The only valid name is default. To
	// get the names of key policies, use ListKeyPolicies.
	//
	// PolicyName is a required field
	PolicyName *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetKeyPolicyInput) GoString

func (s GetKeyPolicyInput) GoString() string

GoString returns the string representation

func (*GetKeyPolicyInput) SetKeyId

func (s *GetKeyPolicyInput) SetKeyId(v string) *GetKeyPolicyInput

SetKeyId sets the KeyId field's value.

func (*GetKeyPolicyInput) SetPolicyName

func (s *GetKeyPolicyInput) SetPolicyName(v string) *GetKeyPolicyInput

SetPolicyName sets the PolicyName field's value.

func (GetKeyPolicyInput) String

func (s GetKeyPolicyInput) String() string

String returns the string representation

func (*GetKeyPolicyInput) Validate

func (s *GetKeyPolicyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetKeyPolicyOutput

type GetKeyPolicyOutput struct {

	// A key policy document in JSON format.
	Policy *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (GetKeyPolicyOutput) GoString

func (s GetKeyPolicyOutput) GoString() string

GoString returns the string representation

func (*GetKeyPolicyOutput) SetPolicy

func (s *GetKeyPolicyOutput) SetPolicy(v string) *GetKeyPolicyOutput

SetPolicy sets the Policy field's value.

func (GetKeyPolicyOutput) String

func (s GetKeyPolicyOutput) String() string

String returns the string representation

type GetKeyRotationStatusInput

type GetKeyRotationStatusInput struct {

	// A unique identifier for the customer master key (CMK).
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify
	// a CMK in a different AWS account, you must use the key ARN.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetKeyRotationStatusInput) GoString

func (s GetKeyRotationStatusInput) GoString() string

GoString returns the string representation

func (*GetKeyRotationStatusInput) SetKeyId

func (s *GetKeyRotationStatusInput) SetKeyId(v string) *GetKeyRotationStatusInput

SetKeyId sets the KeyId field's value.

func (GetKeyRotationStatusInput) String

func (s GetKeyRotationStatusInput) String() string

String returns the string representation

func (*GetKeyRotationStatusInput) Validate

func (s *GetKeyRotationStatusInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetKeyRotationStatusOutput

type GetKeyRotationStatusOutput struct {

	// A Boolean value that specifies whether key rotation is enabled.
	KeyRotationEnabled *bool `type:"boolean"`
	// contains filtered or unexported fields
}

func (GetKeyRotationStatusOutput) GoString

func (s GetKeyRotationStatusOutput) GoString() string

GoString returns the string representation

func (*GetKeyRotationStatusOutput) SetKeyRotationEnabled

func (s *GetKeyRotationStatusOutput) SetKeyRotationEnabled(v bool) *GetKeyRotationStatusOutput

SetKeyRotationEnabled sets the KeyRotationEnabled field's value.

func (GetKeyRotationStatusOutput) String

func (s GetKeyRotationStatusOutput) String() string

String returns the string representation

type GetParametersForImportInput

type GetParametersForImportInput struct {

	// The identifier of the symmetric CMK into which you will import key material.
	// The Origin of the CMK must be EXTERNAL.
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`

	// The algorithm you will use to encrypt the key material before importing it
	// with ImportKeyMaterial. For more information, see Encrypt the Key Material
	// (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-encrypt-key-material.html)
	// in the AWS Key Management Service Developer Guide.
	//
	// WrappingAlgorithm is a required field
	WrappingAlgorithm *string `type:"string" required:"true" enum:"AlgorithmSpec"`

	// The type of wrapping key (public key) to return in the response. Only 2048-bit
	// RSA public keys are supported.
	//
	// WrappingKeySpec is a required field
	WrappingKeySpec *string `type:"string" required:"true" enum:"WrappingKeySpec"`
	// contains filtered or unexported fields
}

func (GetParametersForImportInput) GoString

func (s GetParametersForImportInput) GoString() string

GoString returns the string representation

func (*GetParametersForImportInput) SetKeyId

func (s *GetParametersForImportInput) SetKeyId(v string) *GetParametersForImportInput

SetKeyId sets the KeyId field's value.

func (*GetParametersForImportInput) SetWrappingAlgorithm

func (s *GetParametersForImportInput) SetWrappingAlgorithm(v string) *GetParametersForImportInput

SetWrappingAlgorithm sets the WrappingAlgorithm field's value.

func (*GetParametersForImportInput) SetWrappingKeySpec

func (s *GetParametersForImportInput) SetWrappingKeySpec(v string) *GetParametersForImportInput

SetWrappingKeySpec sets the WrappingKeySpec field's value.

func (GetParametersForImportInput) String

func (s GetParametersForImportInput) String() string

String returns the string representation

func (*GetParametersForImportInput) Validate

func (s *GetParametersForImportInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetParametersForImportOutput

type GetParametersForImportOutput struct {

	// The import token to send in a subsequent ImportKeyMaterial request.
	//
	// ImportToken is automatically base64 encoded/decoded by the SDK.
	ImportToken []byte `min:"1" type:"blob"`

	// The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
	// of the CMK to use in a subsequent ImportKeyMaterial request. This is the
	// same CMK specified in the GetParametersForImport request.
	KeyId *string `min:"1" type:"string"`

	// The time at which the import token and public key are no longer valid. After
	// this time, you cannot use them to make an ImportKeyMaterial request and you
	// must send another GetParametersForImport request to get new ones.
	ParametersValidTo *time.Time `type:"timestamp"`

	// The public key to use to encrypt the key material before importing it with
	// ImportKeyMaterial.
	//
	// PublicKey is automatically base64 encoded/decoded by the SDK.
	PublicKey []byte `min:"1" type:"blob" sensitive:"true"`
	// contains filtered or unexported fields
}

func (GetParametersForImportOutput) GoString

func (s GetParametersForImportOutput) GoString() string

GoString returns the string representation

func (*GetParametersForImportOutput) SetImportToken

func (s *GetParametersForImportOutput) SetImportToken(v []byte) *GetParametersForImportOutput

SetImportToken sets the ImportToken field's value.

func (*GetParametersForImportOutput) SetKeyId

func (s *GetParametersForImportOutput) SetKeyId(v string) *GetParametersForImportOutput

SetKeyId sets the KeyId field's value.

func (*GetParametersForImportOutput) SetParametersValidTo

func (s *GetParametersForImportOutput) SetParametersValidTo(v time.Time) *GetParametersForImportOutput

SetParametersValidTo sets the ParametersValidTo field's value.

func (*GetParametersForImportOutput) SetPublicKey

func (s *GetParametersForImportOutput) SetPublicKey(v []byte) *GetParametersForImportOutput

SetPublicKey sets the PublicKey field's value.

func (GetParametersForImportOutput) String

func (s GetParametersForImportOutput) String() string

String returns the string representation

type GetPublicKeyInput

type GetPublicKeyInput struct {

	// A list of grant tokens.
	//
	// For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token)
	// in the AWS Key Management Service Developer Guide.
	GrantTokens []*string `type:"list"`

	// Identifies the asymmetric CMK that includes the public key.
	//
	// To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
	// or alias ARN. When using an alias name, prefix it with "alias/". To specify
	// a CMK in a different AWS account, you must use the key ARN or alias ARN.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Alias name: alias/ExampleAlias
	//
	//    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. To
	// get the alias name and alias ARN, use ListAliases.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetPublicKeyInput) GoString

func (s GetPublicKeyInput) GoString() string

GoString returns the string representation

func (*GetPublicKeyInput) SetGrantTokens

func (s *GetPublicKeyInput) SetGrantTokens(v []*string) *GetPublicKeyInput

SetGrantTokens sets the GrantTokens field's value.

func (*GetPublicKeyInput) SetKeyId

func (s *GetPublicKeyInput) SetKeyId(v string) *GetPublicKeyInput

SetKeyId sets the KeyId field's value.

func (GetPublicKeyInput) String

func (s GetPublicKeyInput) String() string

String returns the string representation

func (*GetPublicKeyInput) Validate

func (s *GetPublicKeyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetPublicKeyOutput

type GetPublicKeyOutput struct {

	// The type of the of the public key that was downloaded.
	CustomerMasterKeySpec *string `type:"string" enum:"CustomerMasterKeySpec"`

	// The encryption algorithms that AWS KMS supports for this key.
	//
	// This information is critical. If a public key encrypts data outside of AWS
	// KMS by using an unsupported encryption algorithm, the ciphertext cannot be
	// decrypted.
	//
	// This field appears in the response only when the KeyUsage of the public key
	// is ENCRYPT_DECRYPT.
	EncryptionAlgorithms []*string `type:"list"`

	// The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
	// of the asymmetric CMK from which the public key was downloaded.
	KeyId *string `min:"1" type:"string"`

	// The permitted use of the public key. Valid values are ENCRYPT_DECRYPT or
	// SIGN_VERIFY.
	//
	// This information is critical. If a public key with SIGN_VERIFY key usage
	// encrypts data outside of AWS KMS, the ciphertext cannot be decrypted.
	KeyUsage *string `type:"string" enum:"KeyUsageType"`

	// The exported public key.
	//
	// The value is a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo
	// (SPKI), as defined in RFC 5280 (https://tools.ietf.org/html/rfc5280). When
	// you use the HTTP API or the AWS CLI, the value is Base64-encoded. Otherwise,
	// it is not Base64-encoded.
	//
	// PublicKey is automatically base64 encoded/decoded by the SDK.
	PublicKey []byte `min:"1" type:"blob"`

	// The signing algorithms that AWS KMS supports for this key.
	//
	// This field appears in the response only when the KeyUsage of the public key
	// is SIGN_VERIFY.
	SigningAlgorithms []*string `type:"list"`
	// contains filtered or unexported fields
}

func (GetPublicKeyOutput) GoString

func (s GetPublicKeyOutput) GoString() string

GoString returns the string representation

func (*GetPublicKeyOutput) SetCustomerMasterKeySpec

func (s *GetPublicKeyOutput) SetCustomerMasterKeySpec(v string) *GetPublicKeyOutput

SetCustomerMasterKeySpec sets the CustomerMasterKeySpec field's value.

func (*GetPublicKeyOutput) SetEncryptionAlgorithms

func (s *GetPublicKeyOutput) SetEncryptionAlgorithms(v []*string) *GetPublicKeyOutput

SetEncryptionAlgorithms sets the EncryptionAlgorithms field's value.

func (*GetPublicKeyOutput) SetKeyId

func (s *GetPublicKeyOutput) SetKeyId(v string) *GetPublicKeyOutput

SetKeyId sets the KeyId field's value.

func (*GetPublicKeyOutput) SetKeyUsage

func (s *GetPublicKeyOutput) SetKeyUsage(v string) *GetPublicKeyOutput

SetKeyUsage sets the KeyUsage field's value.

func (*GetPublicKeyOutput) SetPublicKey

func (s *GetPublicKeyOutput) SetPublicKey(v []byte) *GetPublicKeyOutput

SetPublicKey sets the PublicKey field's value.

func (*GetPublicKeyOutput) SetSigningAlgorithms

func (s *GetPublicKeyOutput) SetSigningAlgorithms(v []*string) *GetPublicKeyOutput

SetSigningAlgorithms sets the SigningAlgorithms field's value.

func (GetPublicKeyOutput) String

func (s GetPublicKeyOutput) String() string

String returns the string representation

type GrantConstraints

type GrantConstraints struct {

	// A list of key-value pairs that must match the encryption context in the cryptographic
	// operation (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
	// request. The grant allows the operation only when the encryption context
	// in the request is the same as the encryption context specified in this constraint.
	EncryptionContextEquals map[string]*string `type:"map"`

	// A list of key-value pairs that must be included in the encryption context
	// of the cryptographic operation (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
	// request. The grant allows the cryptographic operation only when the encryption
	// context in the request includes the key-value pairs specified in this constraint,
	// although it can include additional key-value pairs.
	EncryptionContextSubset map[string]*string `type:"map"`
	// contains filtered or unexported fields
}

Use this structure to allow cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) in the grant only when the operation request includes the specified encryption context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context).

AWS KMS applies the grant constraints only to cryptographic operations that support an encryption context, that is, all cryptographic operations with a symmetric CMK (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#symmetric-cmks). Grant constraints are not applied to operations that do not support an encryption context, such as cryptographic operations with asymmetric CMKs and management operations, such as DescribeKey or ScheduleKeyDeletion.

In a cryptographic operation, the encryption context in the decryption operation must be an exact, case-sensitive match for the keys and values in the encryption context of the encryption operation. Only the order of the pairs can vary.

However, in a grant constraint, the key in each key-value pair is not case sensitive, but the value is case sensitive.

To avoid confusion, do not use multiple encryption context pairs that differ only by case. To require a fully case-sensitive encryption context, use the kms:EncryptionContext: and kms:EncryptionContextKeys conditions in an IAM or key policy. For details, see kms:EncryptionContext: (https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-context) in the AWS Key Management Service Developer Guide .

func (GrantConstraints) GoString

func (s GrantConstraints) GoString() string

GoString returns the string representation

func (*GrantConstraints) SetEncryptionContextEquals

func (s *GrantConstraints) SetEncryptionContextEquals(v map[string]*string) *GrantConstraints

SetEncryptionContextEquals sets the EncryptionContextEquals field's value.

func (*GrantConstraints) SetEncryptionContextSubset

func (s *GrantConstraints) SetEncryptionContextSubset(v map[string]*string) *GrantConstraints

SetEncryptionContextSubset sets the EncryptionContextSubset field's value.

func (GrantConstraints) String

func (s GrantConstraints) String() string

String returns the string representation

type GrantListEntry

type GrantListEntry struct {

	// A list of key-value pairs that must be present in the encryption context
	// of certain subsequent operations that the grant allows.
	Constraints *GrantConstraints `type:"structure"`

	// The date and time when the grant was created.
	CreationDate *time.Time `type:"timestamp"`

	// The unique identifier for the grant.
	GrantId *string `min:"1" type:"string"`

	// The identity that gets the permissions in the grant.
	//
	// The GranteePrincipal field in the ListGrants response usually contains the
	// user or role designated as the grantee principal in the grant. However, when
	// the grantee principal in the grant is an AWS service, the GranteePrincipal
	// field contains the service principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services),
	// which might represent several different grantee principals.
	GranteePrincipal *string `min:"1" type:"string"`

	// The AWS account under which the grant was issued.
	IssuingAccount *string `min:"1" type:"string"`

	// The unique identifier for the customer master key (CMK) to which the grant
	// applies.
	KeyId *string `min:"1" type:"string"`

	// The friendly name that identifies the grant. If a name was provided in the
	// CreateGrant request, that name is returned. Otherwise this value is null.
	Name *string `min:"1" type:"string"`

	// The list of operations permitted by the grant.
	Operations []*string `type:"list"`

	// The principal that can retire the grant.
	RetiringPrincipal *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

Contains information about a grant.

func (GrantListEntry) GoString

func (s GrantListEntry) GoString() string

GoString returns the string representation

func (*GrantListEntry) SetConstraints

func (s *GrantListEntry) SetConstraints(v *GrantConstraints) *GrantListEntry

SetConstraints sets the Constraints field's value.

func (*GrantListEntry) SetCreationDate

func (s *GrantListEntry) SetCreationDate(v time.Time) *GrantListEntry

SetCreationDate sets the CreationDate field's value.

func (*GrantListEntry) SetGrantId

func (s *GrantListEntry) SetGrantId(v string) *GrantListEntry

SetGrantId sets the GrantId field's value.

func (*GrantListEntry) SetGranteePrincipal

func (s *GrantListEntry) SetGranteePrincipal(v string) *GrantListEntry

SetGranteePrincipal sets the GranteePrincipal field's value.

func (*GrantListEntry) SetIssuingAccount

func (s *GrantListEntry) SetIssuingAccount(v string) *GrantListEntry

SetIssuingAccount sets the IssuingAccount field's value.

func (*GrantListEntry) SetKeyId

func (s *GrantListEntry) SetKeyId(v string) *GrantListEntry

SetKeyId sets the KeyId field's value.

func (*GrantListEntry) SetName

func (s *GrantListEntry) SetName(v string) *GrantListEntry

SetName sets the Name field's value.

func (*GrantListEntry) SetOperations

func (s *GrantListEntry) SetOperations(v []*string) *GrantListEntry

SetOperations sets the Operations field's value.

func (*GrantListEntry) SetRetiringPrincipal

func (s *GrantListEntry) SetRetiringPrincipal(v string) *GrantListEntry

SetRetiringPrincipal sets the RetiringPrincipal field's value.

func (GrantListEntry) String

func (s GrantListEntry) String() string

String returns the string representation

type ImportKeyMaterialInput

type ImportKeyMaterialInput struct {

	// The encrypted key material to import. The key material must be encrypted
	// with the public wrapping key that GetParametersForImport returned, using
	// the wrapping algorithm that you specified in the same GetParametersForImport
	// request.
	//
	// EncryptedKeyMaterial is automatically base64 encoded/decoded by the SDK.
	//
	// EncryptedKeyMaterial is a required field
	EncryptedKeyMaterial []byte `min:"1" type:"blob" required:"true"`

	// Specifies whether the key material expires. The default is KEY_MATERIAL_EXPIRES,
	// in which case you must include the ValidTo parameter. When this parameter
	// is set to KEY_MATERIAL_DOES_NOT_EXPIRE, you must omit the ValidTo parameter.
	ExpirationModel *string `type:"string" enum:"ExpirationModelType"`

	// The import token that you received in the response to a previous GetParametersForImport
	// request. It must be from the same response that contained the public key
	// that you used to encrypt the key material.
	//
	// ImportToken is automatically base64 encoded/decoded by the SDK.
	//
	// ImportToken is a required field
	ImportToken []byte `min:"1" type:"blob" required:"true"`

	// The identifier of the symmetric CMK that receives the imported key material.
	// The CMK's Origin must be EXTERNAL. This must be the same CMK specified in
	// the KeyID parameter of the corresponding GetParametersForImport request.
	//
	// Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
	//
	// For example:
	//
	//    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
	//
	//    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
	//
	// To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
	//
	// KeyId is a required field
	KeyId *string `min:"1" type:"string" required:"true"`

	// The time at which the imported key material expires. When the key material
	// expires, AWS KMS deletes the key material and the CMK becomes unusable. You
	// must omit this parameter when the ExpirationModel parameter is set to KEY_MATERIAL_DOES_NOT_EXPIRE.
	// Otherwise it is required.
	ValidTo *time.Time `type:"timestamp"`
	// contains filtered or unexported fields
}

func (ImportKeyMaterialInput) GoString

func (s ImportKeyMaterialInput) GoString() string

GoString returns the string representation

func (*ImportKeyMaterialInput) SetEncryptedKeyMaterial

func (s *ImportKeyMaterialInput) SetEncryptedKeyMaterial(v []byte) *ImportKeyMaterialInput

SetEncryptedKeyMaterial sets the EncryptedKeyMaterial field's value.

func (*ImportKeyMaterialInput) SetExpirationModel

func (s *ImportKeyMaterialInput) SetExpirationModel(v string) *ImportKeyMaterialInput

SetExpirationModel sets the ExpirationModel field's value.

func (*ImportKeyMaterialInput) SetImportToken

func (s *ImportKeyMaterialInput) SetImportToken(v []byte) *ImportKeyMaterialInput

SetImportToken sets the ImportToken field's value.

func (*ImportKeyMaterialInput) SetKeyId

func (s *ImportKeyMaterialInput) SetKeyId(v string) *ImportKeyMaterialInput

SetKeyId sets the KeyId field's value.

func (*ImportKeyMaterialInput) SetValidTo

func (s *ImportKeyMaterialInput) SetValidTo(v time.Time) *ImportKeyMaterialInput

SetValidTo sets the ValidTo field's value.

func (ImportKeyMaterialInput) String

func (s ImportKeyMaterialInput) String() string

String returns the string representation

func (*ImportKeyMaterialInput) Validate

func (s *ImportKeyMaterialInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ImportKeyMaterialOutput

type ImportKeyMaterialOutput struct {
	// contains filtered or unexported fields
}

func (ImportKeyMaterialOutput) GoString

func (s ImportKeyMaterialOutput) GoString() string

GoString returns the string representation

func (ImportKeyMaterialOutput) String

func (s ImportKeyMaterialOutput) String() string

String returns the string representation

type IncorrectKeyException

type IncorrectKeyException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the specified CMK cannot decrypt the data. The KeyId in a Decrypt request and the SourceKeyId in a ReEncrypt request must identify the same CMK that was used to encrypt the ciphertext.

func (*IncorrectKeyException) Code

func (s *IncorrectKeyException) Code() string

Code returns the exception type name.

func (*IncorrectKeyException) Error

func (s *IncorrectKeyException) Error() string

func (IncorrectKeyException) GoString

func (s IncorrectKeyException) GoString() string

GoString returns the string representation

func (*IncorrectKeyException) Message

func (s *IncorrectKeyException) Message() string

Message returns the exception's message.

func (*IncorrectKeyException) OrigErr

func (s *IncorrectKeyException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*IncorrectKeyException) RequestID

func (s *IncorrectKeyException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*IncorrectKeyException) StatusCode

func (s *IncorrectKeyException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (IncorrectKeyException) String

func (s IncorrectKeyException) String() string

String returns the string representation

type IncorrectKeyMaterialException

type IncorrectKeyMaterialException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the key material in the request is, expired, invalid, or is not the same key material that was previously imported into this customer master key (CMK).

func (*IncorrectKeyMaterialException) Code

func (s *IncorrectKeyMaterialException) Code() string

Code returns the exception type name.

func (*IncorrectKeyMaterialException) Error

func (s *IncorrectKeyMaterialException) Error() string

func (IncorrectKeyMaterialException) GoString

func (s IncorrectKeyMaterialException) GoString() string

GoString returns the string representation

func (*IncorrectKeyMaterialException) Message

func (s *IncorrectKeyMaterialException) Message() string

Message returns the exception's message.

func (*IncorrectKeyMaterialException) OrigErr

func (s *IncorrectKeyMaterialException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*IncorrectKeyMaterialException) RequestID

func (s *IncorrectKeyMaterialException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*IncorrectKeyMaterialException) StatusCode

func (s *IncorrectKeyMaterialException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (IncorrectKeyMaterialException) String

func (s IncorrectKeyMaterialException) String() string

String returns the string representation

type IncorrectTrustAnchorException

type IncorrectTrustAnchorException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the trust anchor certificate in the request is not the trust anchor certificate for the specified AWS CloudHSM cluster.

When you initialize the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr), you create the trust anchor certificate and save it in the customerCA.crt file.

func (*IncorrectTrustAnchorException) Code

func (s *IncorrectTrustAnchorException) Code() string

Code returns the exception type name.

func (*IncorrectTrustAnchorException) Error

func (s *IncorrectTrustAnchorException) Error() string

func (IncorrectTrustAnchorException) GoString

func (s IncorrectTrustAnchorException) GoString() string

GoString returns the string representation

func (*IncorrectTrustAnchorException) Message

func (s *IncorrectTrustAnchorException) Message() string

Message returns the exception's message.

func (*IncorrectTrustAnchorException) OrigErr

func (s *IncorrectTrustAnchorException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*IncorrectTrustAnchorException) RequestID

func (s *IncorrectTrustAnchorException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*IncorrectTrustAnchorException) StatusCode

func (s *IncorrectTrustAnchorException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (IncorrectTrustAnchorException) String

func (s IncorrectTrustAnchorException) String() string

String returns the string representation

type InternalException

type InternalException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because an internal exception occurred. The request can be retried.

func (*InternalException) Code

func (s *InternalException) Code() string

Code returns the exception type name.

func (*InternalException) Error

func (s *InternalException) Error() string

func (InternalException) GoString

func (s InternalException) GoString() string

GoString returns the string representation

func (*InternalException) Message

func (s *InternalException) Message() string

Message returns the exception's message.

func (*InternalException) OrigErr

func (s *InternalException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InternalException) RequestID

func (s *InternalException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InternalException) StatusCode

func (s *InternalException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InternalException) String

func (s InternalException) String() string

String returns the string representation

type InvalidAliasNameException

type InvalidAliasNameException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the specified alias name is not valid.

func (*InvalidAliasNameException) Code

func (s *InvalidAliasNameException) Code() string

Code returns the exception type name.

func (*InvalidAliasNameException) Error

func (s *InvalidAliasNameException) Error() string

func (InvalidAliasNameException) GoString

func (s InvalidAliasNameException) GoString() string

GoString returns the string representation

func (*InvalidAliasNameException) Message

func (s *InvalidAliasNameException) Message() string

Message returns the exception's message.

func (*InvalidAliasNameException) OrigErr

func (s *InvalidAliasNameException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidAliasNameException) RequestID

func (s *InvalidAliasNameException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidAliasNameException) StatusCode

func (s *InvalidAliasNameException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidAliasNameException) String

func (s InvalidAliasNameException) String() string

String returns the string representation

type InvalidArnException

type InvalidArnException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because a specified ARN, or an ARN in a key policy, is not valid.

func (*InvalidArnException) Code

func (s *InvalidArnException) Code() string

Code returns the exception type name.

func (*InvalidArnException) Error

func (s *InvalidArnException) Error() string

func (InvalidArnException) GoString

func (s InvalidArnException) GoString() string

GoString returns the string representation

func (*InvalidArnException) Message

func (s *InvalidArnException) Message() string

Message returns the exception's message.

func (*InvalidArnException) OrigErr

func (s *InvalidArnException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidArnException) RequestID

func (s *InvalidArnException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidArnException) StatusCode

func (s *InvalidArnException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidArnException) String

func (s InvalidArnException) String() string

String returns the string representation

type InvalidCiphertextException

type InvalidCiphertextException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

From the Decrypt or ReEncrypt operation, the request was rejected because the specified ciphertext, or additional authenticated data incorporated into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise invalid.

From the ImportKeyMaterial operation, the request was rejected because AWS KMS could not decrypt the encrypted (wrapped) key material.

func (*InvalidCiphertextException) Code

func (s *InvalidCiphertextException) Code() string

Code returns the exception type name.

func (*InvalidCiphertextException) Error

func (s *InvalidCiphertextException) Error() string

func (InvalidCiphertextException) GoString

func (s InvalidCiphertextException) GoString() string

GoString returns the string representation

func (*InvalidCiphertextException) Message

func (s *InvalidCiphertextException) Message() string

Message returns the exception's message.

func (*InvalidCiphertextException) OrigErr

func (s *InvalidCiphertextException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidCiphertextException) RequestID

func (s *InvalidCiphertextException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidCiphertextException) StatusCode

func (s *InvalidCiphertextException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidCiphertextException) String

func (s InvalidCiphertextException) String() string

String returns the string representation

type InvalidGrantIdException

type InvalidGrantIdException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the specified GrantId is not valid.

func (*InvalidGrantIdException) Code

func (s *InvalidGrantIdException) Code() string

Code returns the exception type name.

func (*InvalidGrantIdException) Error

func (s *InvalidGrantIdException) Error() string

func (InvalidGrantIdException) GoString

func (s InvalidGrantIdException) GoString() string

GoString returns the string representation

func (*InvalidGrantIdException) Message

func (s *InvalidGrantIdException) Message() string

Message returns the exception's message.

func (*InvalidGrantIdException) OrigErr

func (s *InvalidGrantIdException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidGrantIdException) RequestID

func (s *InvalidGrantIdException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidGrantIdException) StatusCode

func (s *InvalidGrantIdException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidGrantIdException) String

func (s InvalidGrantIdException) String() string

String returns the string representation

type InvalidGrantTokenException

type InvalidGrantTokenException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the specified grant token is not valid.

func (*InvalidGrantTokenException) Code

func (s *InvalidGrantTokenException) Code() string

Code returns the exception type name.

func (*InvalidGrantTokenException) Error

func (s *InvalidGrantTokenException) Error() string

func (InvalidGrantTokenException) GoString

func (s InvalidGrantTokenException) GoString() string

GoString returns the string representation

func (*InvalidGrantTokenException) Message

func (s *InvalidGrantTokenException) Message() string

Message returns the exception's message.

func (*InvalidGrantTokenException) OrigErr

func (s *InvalidGrantTokenException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidGrantTokenException) RequestID

func (s *InvalidGrantTokenException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidGrantTokenException) StatusCode

func (s *InvalidGrantTokenException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidGrantTokenException) String

func (s InvalidGrantTokenException) String() string

String returns the string representation

type InvalidImportTokenException

type InvalidImportTokenException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the provided import token is invalid or is associated with a different customer master key (CMK).

func (*InvalidImportTokenException) Code

func (s *InvalidImportTokenException) Code() string

Code returns the exception type name.

func (*InvalidImportTokenException) Error

func (s *InvalidImportTokenException) Error() string

func (InvalidImportTokenException) GoString

func (s InvalidImportTokenException) GoString() string

GoString returns the string representation

func (*InvalidImportTokenException) Message

func (s *InvalidImportTokenException) Message() string

Message returns the exception's message.

func (*InvalidImportTokenException) OrigErr

func (s *InvalidImportTokenException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidImportTokenException) RequestID

func (s *InvalidImportTokenException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidImportTokenException) StatusCode

func (s *InvalidImportTokenException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidImportTokenException) String

func (s InvalidImportTokenException) String() string

String returns the string representation

type InvalidKeyUsageException

type InvalidKeyUsageException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected for one of the following reasons:

* The KeyUsage value of the CMK is incompatible with the API operation.

* The encryption algorithm or signing algorithm specified for the operation
is incompatible with the type of key material in the CMK (CustomerMasterKeySpec).

For encrypting, decrypting, re-encrypting, and generating data keys, the KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage must be SIGN_VERIFY. To find the KeyUsage of a CMK, use the DescribeKey operation.

To find the encryption or signing algorithms supported for a particular CMK, use the DescribeKey operation.

func (*InvalidKeyUsageException) Code

func (s *InvalidKeyUsageException) Code() string

Code returns the exception type name.

func (*InvalidKeyUsageException) Error

func (s *InvalidKeyUsageException) Error() string

func (InvalidKeyUsageException) GoString

func (s InvalidKeyUsageException) GoString() string

GoString returns the string representation

func (*InvalidKeyUsageException) Message

func (s *InvalidKeyUsageException) Message() string

Message returns the exception's message.

func (*InvalidKeyUsageException) OrigErr

func (s *InvalidKeyUsageException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidKeyUsageException) RequestID

func (s *InvalidKeyUsageException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidKeyUsageException) StatusCode

func (s *InvalidKeyUsageException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidKeyUsageException) String

func (s InvalidKeyUsageException) String() string

String returns the string representation

type InvalidMarkerException

type InvalidMarkerException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the marker that specifies where pagination should next begin is not valid.

func (*InvalidMarkerException) Code

func (s *InvalidMarkerException) Code() string

Code returns the exception type name.

func (*InvalidMarkerException) Error

func (s *InvalidMarkerException) Error() string

func (InvalidMarkerException) GoString

func (s InvalidMarkerException) GoString() string

GoString returns the string representation

func (*InvalidMarkerException) Message

func (s *InvalidMarkerException) Message() string

Message returns the exception's message.

func (*InvalidMarkerException) OrigErr

func (s *InvalidMarkerException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidMarkerException) RequestID

func (s *InvalidMarkerException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidMarkerException) StatusCode

func (s *InvalidMarkerException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidMarkerException) String

func (s InvalidMarkerException) String() string

String returns the string representation

type InvalidStateException

type InvalidStateException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The request was rejected because the state of the specified resource is not valid for this request.

For more information about how key state affects the use of a CMK, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the AWS Key Management Service Developer Guide .

func (*InvalidStateException) Code

func (s *InvalidStateException) Code() string

Code returns the exception type name.

func (*InvalidStateException) Error

func (s *InvalidStateException) Error() string

func (InvalidStateException) GoString

func (s InvalidStateException) GoString() string

GoString returns the string representation

func (*InvalidStateException) Message

func (s *InvalidStateException) Message() string

Message returns the exception's message.

func (*InvalidStateException) OrigErr

func (s *InvalidStateException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidStateException) RequestID

func (s *InvalidStateException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidStateException) StatusCode

func (s *InvalidStateException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidStateException) String

func (s InvalidStateException) String() string

String returns the string representation

type KMS

type KMS struct {
	*client.Client
}

KMS provides the API operation methods for making requests to AWS Key Management Service. See this package's package overview docs for details on the service.

KMS methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(p client.ConfigProvider, cfgs ...*aws.Config) *KMS

New creates a new instance of the KMS client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.

Example:

mySession := session.Must(session.NewSession())

// Create a KMS client from just a session.
svc := kms.New(mySession)

// Create a KMS client with additional configuration
svc := kms.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*KMS) CancelKeyDeletion

func (c *KMS) CancelKeyDeletion(input *CancelKeyDeletionInput) (*CancelKeyDeletionOutput, error)

CancelKeyDeletion API operation for AWS Key Management Service.

Cancels the deletion of a customer master key (CMK). When this operation succeeds, the key state of the CMK is Disabled. To enable the CMK, use EnableKey. You cannot perform this operation on a CMK in a different AWS account.

For more information about scheduling and canceling deletion of a CMK, see Deleting Customer Master Keys (https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) in the AWS Key Management Service Developer Guide.

The CMK that you use for this operation must be in a compatible key state. For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the AWS Key Management Service Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Key Management Service's API operation CancelKeyDeletion for usage and error information.

Returned Error Types:

* NotFoundException
The request was rejected because the specified entity or resource could not
be found.

* InvalidArnException
The request was rejected because a specified ARN, or an ARN in a key policy,
is not valid.

* DependencyTimeoutException
The system timed out while trying to fulfill the request. The request can
be retried.

* InternalException
The request was rejected because an internal exception occurred. The request
can be retried.

* InvalidStateException
The request was rejected because the state of the specified resource is not
valid for this request.

For more information about how key state affects the use of a CMK, see How
Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
in the AWS Key Management Service Developer Guide .

See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CancelKeyDeletion

Example (Shared00)

To cancel deletion of a customer master key (CMK)

The following example cancels deletion of the specified CMK.

Code:

package main

import (
	"fmt"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/kms"
)

func main() {
	svc := kms.New(session.New())
	input := &kms.CancelKeyDeletionInput{
		KeyId: aws.String("1234abcd-12ab-34cd-56ef-1234567890ab"),
	}

	result, err := svc.CancelKeyDeletion(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case kms.ErrCodeNotFoundException:
				fmt.Println(kms.ErrCodeNotFoundException, aerr.Error())
			case kms.ErrCodeInvalidArnException:
				fmt.Println(kms.ErrCodeInvalidArnException, aerr.Error())
			case kms.ErrCodeDependencyTimeoutException:
				fmt.Println(kms.ErrCodeDependencyTimeoutException, aerr.Error())
			case kms.ErrCodeInternalException:
				fmt.Println(kms.ErrCodeInternalException, aerr.Error())
			case kms.ErrCodeInvalidStateException:
				fmt.Println(kms.ErrCodeInvalidStateException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}

func (*KMS) CancelKeyDeletionRequest

func (c *KMS) CancelKeyDeletionRequest(input *CancelKeyDeletionInput) (req *request.Request, output *CancelKeyDeletionOutput)

CancelKeyDeletionRequest generates a "aws/request.Request" representing the client's request for the CancelKeyDeletion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CancelKeyDeletion for more information on using the CancelKeyDeletion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CancelKeyDeletionRequest method.
req, resp := client.CancelKeyDeletionRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CancelKeyDeletion

func (*KMS) CancelKeyDeletionWithContext

func (c *KMS) CancelKeyDeletionWithContext(ctx aws.Context, input *CancelKeyDeletionInput, opts ...request.Option) (*CancelKeyDeletionOutput, error)

CancelKeyDeletionWithContext is the same as CancelKeyDeletion with the addition of the ability to pass a context and additional request options.

See CancelKeyDeletion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*KMS) ConnectCustomKeyStore

func (c *KMS) ConnectCustomKeyStore(input *ConnectCustomKeyStoreInput) (*ConnectCustomKeyStoreOutput, error)

ConnectCustomKeyStore API operation for AWS Key Management Service.

Connects or reconnects a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) to its associated AWS CloudHSM cluster.

The custom key store must be connected before you can create customer master keys (CMKs) in the key store or use the CMKs it contains. You can disconnect and reconnect a custom key store at any time.

To connect a custom key store, its associated AWS CloudHSM cluster must have at least one active HSM. To get the number of active HSMs in a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) operation. To add HSMs to the cluster, use the CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) operation. Also, the kmsuser crypto user (https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser) (CU) must not be logged into the cluster. This prevents AWS KMS from using this account to log in.

The connection process can take an extended amount of time to complete; up to 20 minutes. This operation starts the connection process, but it does not wait for it to complete. When it succeeds, this operation quickly returns an HTTP 200 response and a JSON object with no properties. However, this response does not indicate that the custom key store is connected. To get the connection state of the custom key store, use the DescribeCustomKeyStores operation.

During the connection process, AWS KMS finds the AWS CloudHSM cluster that is associated with the custom key store, creates the connection infrastructure, connects to the cluster, logs into the AWS CloudHSM client as the kmsuser CU, and rotates its password.

The ConnectCustomKeyStore operation might fail for various reasons. To find the reason, use the DescribeCustomKeyStores operation and see the ConnectionErrorCode in the response. For help interpreting the ConnectionErrorCode, see CustomKeyStoresListEntry.

To fix the failure, use the DisconnectCustomKeyStore operation to disconnect the custom key store, correct the error, use the UpdateCustomKeyStore operation if necessary, and then use ConnectCustomKeyStore again.

If you are having trouble connecting or disconnecting a custom key store, see Troubleshooting a Custom Key Store (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) in the AWS Key Management Service Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Key Management Service's API operation ConnectCustomKeyStore for usage and error information.

Returned Error Types:

* CloudHsmClusterN