Enum aws_sdk_secretsmanager::Error
source · #[non_exhaustive]pub enum Error {
Show 13 variants
DecryptionFailure(DecryptionFailure),
EncryptionFailure(EncryptionFailure),
InternalServiceError(InternalServiceError),
InvalidNextTokenException(InvalidNextTokenException),
InvalidParameterException(InvalidParameterException),
InvalidRequestException(InvalidRequestException),
LimitExceededException(LimitExceededException),
MalformedPolicyDocumentException(MalformedPolicyDocumentException),
PreconditionNotMetException(PreconditionNotMetException),
PublicPolicyException(PublicPolicyException),
ResourceExistsException(ResourceExistsException),
ResourceNotFoundException(ResourceNotFoundException),
Unhandled(Unhandled),
}
Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DecryptionFailure(DecryptionFailure)
Secrets Manager can't decrypt the protected secret text using the provided KMS key.
EncryptionFailure(EncryptionFailure)
Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the KMS key is available, enabled, and not in an invalid state. For more information, see Key state: Effect on your KMS key.
InternalServiceError(InternalServiceError)
An error occurred on the server side.
InvalidNextTokenException(InvalidNextTokenException)
The NextToken
value is invalid.
InvalidParameterException(InvalidParameterException)
The parameter name or value is invalid.
InvalidRequestException(InvalidRequestException)
A parameter value is not valid for the current state of the resource.
Possible causes:
-
The secret is scheduled for deletion.
-
You tried to enable rotation on a secret that doesn't already have a Lambda function ARN configured and you didn't include such an ARN as a parameter in this call.
-
The secret is managed by another service, and you must use that service to update it. For more information, see Secrets managed by other Amazon Web Services services.
LimitExceededException(LimitExceededException)
The request failed because it would exceed one of the Secrets Manager quotas.
MalformedPolicyDocumentException(MalformedPolicyDocumentException)
The resource policy has syntax errors.
PreconditionNotMetException(PreconditionNotMetException)
The request failed because you did not complete all the prerequisite steps.
PublicPolicyException(PublicPolicyException)
The BlockPublicPolicy
parameter is set to true, and the resource policy did not prevent broad access to the secret.
ResourceExistsException(ResourceExistsException)
A resource with the ID you requested already exists.
ResourceNotFoundException(ResourceNotFoundException)
Secrets Manager can't find the resource that you asked for.
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).