pub enum CreateKeyError {
CloudHsmClusterInvalidConfiguration(String),
CustomKeyStoreInvalidState(String),
CustomKeyStoreNotFound(String),
DependencyTimeout(String),
InvalidArn(String),
KMSInternal(String),
LimitExceeded(String),
MalformedPolicyDocument(String),
Tag(String),
UnsupportedOperation(String),
}Expand description
Errors returned by CreateKey
Variants§
CloudHsmClusterInvalidConfiguration(String)
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 (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 operation.
-
The cluster must contain at least as many HSMs as the operation requires. To add HSMs, use the AWS CloudHSM CreateHsm 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 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 in the AWS CloudHSM User Guide. For information about cluster security groups, see Configure a Default Security Group in the AWS CloudHSM User Guide .
CustomKeyStoreInvalidState(String)
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
ConnectionStateisCONNECTED. -
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
ConnectionStateisDISCONNECTED. -
You requested the ConnectCustomKeyStore operation on a custom key store with a
ConnectionStateofDISCONNECTINGorFAILED. This operation is valid for all otherConnectionStatevalues.
CustomKeyStoreNotFound(String)
The request was rejected because AWS KMS cannot find a custom key store with the specified key store name or ID.
DependencyTimeout(String)
The system timed out while trying to fulfill the request. The request can be retried.
InvalidArn(String)
The request was rejected because a specified ARN, or an ARN in a key policy, is not valid.
KMSInternal(String)
The request was rejected because an internal exception occurred. The request can be retried.
LimitExceeded(String)
The request was rejected because a quota was exceeded. For more information, see Quotas in the AWS Key Management Service Developer Guide.
MalformedPolicyDocument(String)
The request was rejected because the specified policy is not syntactically or semantically correct.
Tag(String)
The request was rejected because one or more tags are not valid.
UnsupportedOperation(String)
The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.
Implementations§
Source§impl CreateKeyError
impl CreateKeyError
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateKeyError>
Trait Implementations§
Source§impl Debug for CreateKeyError
impl Debug for CreateKeyError
Source§impl Display for CreateKeyError
impl Display for CreateKeyError
Source§impl Error for CreateKeyError
impl Error for CreateKeyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()