#[non_exhaustive]pub enum ConnectCustomKeyStoreError {
CloudHsmClusterInvalidConfigurationException(CloudHsmClusterInvalidConfigurationException),
CloudHsmClusterNotActiveException(CloudHsmClusterNotActiveException),
CustomKeyStoreInvalidStateException(CustomKeyStoreInvalidStateException),
CustomKeyStoreNotFoundException(CustomKeyStoreNotFoundException),
KmsInternalException(KmsInternalException),
Unhandled(Unhandled),
}Expand description
Error type for the ConnectCustomKeyStoreError operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CloudHsmClusterInvalidConfigurationException(CloudHsmClusterInvalidConfigurationException)
The request was rejected because the associated CloudHSM cluster did not meet the configuration requirements for an CloudHSM key store.
-
The CloudHSM 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-
-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 CloudHSM cluster. Do not delete or change them. To get information about a particular security group, use the DescribeSecurityGroups operation. -
The CloudHSM cluster must contain at least as many HSMs as the operation requires. To add HSMs, use the CloudHSM CreateHsm operation.
For the
CreateCustomKeyStore,UpdateCustomKeyStore, andCreateKeyoperations, the CloudHSM cluster must have at least two active HSMs, each in a different Availability Zone. For theConnectCustomKeyStoreoperation, the CloudHSM must contain at least one active HSM.
For information about the requirements for an CloudHSM cluster that is associated with an CloudHSM key store, see Assemble the Prerequisites in the Key Management Service Developer Guide. For information about creating a private subnet for an CloudHSM cluster, see Create a Private Subnet in the CloudHSM User Guide. For information about cluster security groups, see Configure a Default Security Group in the CloudHSM User Guide .
CloudHsmClusterNotActiveException(CloudHsmClusterNotActiveException)
The request was rejected because the CloudHSM cluster associated with the CloudHSM key store is not active. Initialize and activate the cluster and try the command again. For detailed instructions, see Getting Started in the CloudHSM User Guide.
CustomKeyStoreInvalidStateException(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
ConnectCustomKeyStoreoperation on a custom key store with aConnectionStateofDISCONNECTINGorFAILED. This operation is valid for all otherConnectionStatevalues. To reconnect a custom key store in aFAILEDstate, disconnect it (DisconnectCustomKeyStore), then connect it (ConnectCustomKeyStore). -
You requested the
CreateKeyoperation in a custom key store that is not connected. This operations is valid only when the custom key storeConnectionStateisCONNECTED. -
You requested the
DisconnectCustomKeyStoreoperation on a custom key store with aConnectionStateofDISCONNECTINGorDISCONNECTED. This operation is valid for all otherConnectionStatevalues. -
You requested the
UpdateCustomKeyStoreorDeleteCustomKeyStoreoperation on a custom key store that is not disconnected. This operation is valid only when the custom key storeConnectionStateisDISCONNECTED. -
You requested the
GenerateRandomoperation in an CloudHSM key store that is not connected. This operation is valid only when the CloudHSM key storeConnectionStateisCONNECTED.
CustomKeyStoreNotFoundException(CustomKeyStoreNotFoundException)
The request was rejected because KMS cannot find a custom key store with the specified key store name or ID.
KmsInternalException(KmsInternalException)
The request was rejected because an internal exception occurred. The request can be retried.
Unhandled(Unhandled)
Unhandled directly is not forwards compatible. Instead, match using a variable wildcard pattern and check .code():
err if err.code() == Some("SpecificExceptionCode") => { /* handle the error */ }
See ProvideErrorMetadata for what information is available for the error.An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Implementations§
source§impl ConnectCustomKeyStoreError
impl ConnectCustomKeyStoreError
sourcepub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
pub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
Creates the ConnectCustomKeyStoreError::Unhandled variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the ConnectCustomKeyStoreError::Unhandled variant from an ErrorMetadata.
sourcepub fn meta(&self) -> &ErrorMetadata
pub fn meta(&self) -> &ErrorMetadata
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn is_cloud_hsm_cluster_invalid_configuration_exception(&self) -> bool
pub fn is_cloud_hsm_cluster_invalid_configuration_exception(&self) -> bool
Returns true if the error kind is ConnectCustomKeyStoreError::CloudHsmClusterInvalidConfigurationException.
sourcepub fn is_cloud_hsm_cluster_not_active_exception(&self) -> bool
pub fn is_cloud_hsm_cluster_not_active_exception(&self) -> bool
Returns true if the error kind is ConnectCustomKeyStoreError::CloudHsmClusterNotActiveException.
sourcepub fn is_custom_key_store_invalid_state_exception(&self) -> bool
pub fn is_custom_key_store_invalid_state_exception(&self) -> bool
Returns true if the error kind is ConnectCustomKeyStoreError::CustomKeyStoreInvalidStateException.
sourcepub fn is_custom_key_store_not_found_exception(&self) -> bool
pub fn is_custom_key_store_not_found_exception(&self) -> bool
Returns true if the error kind is ConnectCustomKeyStoreError::CustomKeyStoreNotFoundException.
sourcepub fn is_kms_internal_exception(&self) -> bool
pub fn is_kms_internal_exception(&self) -> bool
Returns true if the error kind is ConnectCustomKeyStoreError::KmsInternalException.
Trait Implementations§
source§impl CreateUnhandledError for ConnectCustomKeyStoreError
impl CreateUnhandledError for ConnectCustomKeyStoreError
source§fn create_unhandled_error(
source: Box<dyn Error + Send + Sync + 'static>,
meta: Option<ErrorMetadata>
) -> Self
fn create_unhandled_error( source: Box<dyn Error + Send + Sync + 'static>, meta: Option<ErrorMetadata> ) -> Self
source and error metadata.source§impl Debug for ConnectCustomKeyStoreError
impl Debug for ConnectCustomKeyStoreError
source§impl Display for ConnectCustomKeyStoreError
impl Display for ConnectCustomKeyStoreError
source§impl Error for ConnectCustomKeyStoreError
impl Error for ConnectCustomKeyStoreError
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
source§impl From<ConnectCustomKeyStoreError> for Error
impl From<ConnectCustomKeyStoreError> for Error
source§fn from(err: ConnectCustomKeyStoreError) -> Self
fn from(err: ConnectCustomKeyStoreError) -> Self
source§impl ProvideErrorMetadata for ConnectCustomKeyStoreError
impl ProvideErrorMetadata for ConnectCustomKeyStoreError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for ConnectCustomKeyStoreError
impl RequestId for ConnectCustomKeyStoreError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None if the service could not be reached.