Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
AWS Secrets Manager API Reference
AWS Secrets Manager is a web service that enables you to store, manage, and retrieve, secrets.
This guide provides descriptions of the Secrets Manager API. For more information about using this service, see the AWS Secrets Manager User Guide .
API Version
This version of the Secrets Manager API Reference documents the Secrets Manager API version 2017-10-17.
We recommend that you use the AWS SDKs to make programmatic API calls to Secrets Manager. However, you also can use the Secrets Manager HTTP Query API to make direct calls to the Secrets Manager web service. To learn more about the Secrets Manager HTTP Query API, see Making Query Requests in the AWS Secrets Manager User Guide .
Secrets Manager supports GET and POST requests for all actions. That is, the API doesn't require you to use GET for some actions and POST for others. However, GET requests are subject to the limitation size of a URL. Therefore, for operations that require larger sizes, use a POST request.
Support and Feedback for AWS Secrets Manager
We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com , or post your feedback and questions in the AWS Secrets Manager Discussion Forum . For more information about the AWS Discussion Forums, see Forums Help .
How examples are presented
The JSON that AWS Secrets Manager expects as your request parameters and that the service returns as a response to HTTP query requests are single, long strings without line breaks or white space formatting. The JSON shown in the examples is formatted with both line breaks and white space to improve readability. When example input parameters would also result in long strings that extend beyond the screen, we insert line breaks to enhance readability. You should always submit the input as a single JSON text string.
Logging API Requests
AWS Secrets Manager supports AWS CloudTrail, a service that records AWS API calls for your AWS account and delivers log files to an Amazon S3 bucket. By using information that's collected by AWS CloudTrail, you can determine which requests were successfully made to Secrets Manager, who made the request, when it was made, and so on. For more about AWS Secrets Manager and its support for AWS CloudTrail, see Logging AWS Secrets Manager Events with AWS CloudTrail in the AWS Secrets Manager User Guide . To learn more about CloudTrail, including how to turn it on and find your log files, see the AWS CloudTrail User Guide .
- secretsManager :: Service
- _MalformedPolicyDocumentException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError
- _DecryptionFailure :: AsError a => Getting (First ServiceError) a ServiceError
- _EncryptionFailure :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
- _InternalServiceError :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceExistsException :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
- _LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- module Network.AWS.SecretsManager.DeleteSecret
- module Network.AWS.SecretsManager.ListSecrets
- module Network.AWS.SecretsManager.UpdateSecret
- module Network.AWS.SecretsManager.RotateSecret
- module Network.AWS.SecretsManager.CreateSecret
- module Network.AWS.SecretsManager.GetSecretValue
- module Network.AWS.SecretsManager.DescribeSecret
- module Network.AWS.SecretsManager.RestoreSecret
- module Network.AWS.SecretsManager.CancelRotateSecret
- module Network.AWS.SecretsManager.PutSecretValue
- module Network.AWS.SecretsManager.GetRandomPassword
- module Network.AWS.SecretsManager.ListSecretVersionIds
- module Network.AWS.SecretsManager.TagResource
- module Network.AWS.SecretsManager.UntagResource
- module Network.AWS.SecretsManager.UpdateSecretVersionStage
- data RotationRulesType
- rotationRulesType :: RotationRulesType
- rrtAutomaticallyAfterDays :: Lens' RotationRulesType (Maybe Natural)
- data SecretListEntry
- secretListEntry :: SecretListEntry
- sleLastChangedDate :: Lens' SecretListEntry (Maybe UTCTime)
- sleARN :: Lens' SecretListEntry (Maybe Text)
- sleSecretVersionsToStages :: Lens' SecretListEntry (HashMap Text (NonEmpty Text))
- sleRotationRules :: Lens' SecretListEntry (Maybe RotationRulesType)
- sleDeletedDate :: Lens' SecretListEntry (Maybe UTCTime)
- sleRotationEnabled :: Lens' SecretListEntry (Maybe Bool)
- sleKMSKeyId :: Lens' SecretListEntry (Maybe Text)
- sleName :: Lens' SecretListEntry (Maybe Text)
- sleLastRotatedDate :: Lens' SecretListEntry (Maybe UTCTime)
- sleLastAccessedDate :: Lens' SecretListEntry (Maybe UTCTime)
- sleDescription :: Lens' SecretListEntry (Maybe Text)
- sleRotationLambdaARN :: Lens' SecretListEntry (Maybe Text)
- sleTags :: Lens' SecretListEntry [Tag]
- data SecretVersionsListEntry
- secretVersionsListEntry :: SecretVersionsListEntry
- svleVersionId :: Lens' SecretVersionsListEntry (Maybe Text)
- svleVersionStages :: Lens' SecretVersionsListEntry (Maybe (NonEmpty Text))
- svleCreatedDate :: Lens' SecretVersionsListEntry (Maybe UTCTime)
- svleLastAccessedDate :: Lens' SecretVersionsListEntry (Maybe UTCTime)
- data Tag
- tag :: Tag
- tagValue :: Lens' Tag (Maybe Text)
- tagKey :: Lens' Tag (Maybe Text)
Service Configuration
secretsManager :: Service Source #
API version 2017-10-17
of the Amazon Secrets Manager SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by SecretsManager
.
MalformedPolicyDocumentException
_MalformedPolicyDocumentException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The policy document that you provided isn't valid.
InvalidParameterException
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError Source #
You provided an invalid value for a parameter.
InvalidRequestException
_InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError Source #
You provided a parameter value that is not valid for the current state of the resource. For example, if you try to enable rotation on a secret, you must already have a Lambda function ARN configured or included as a parameter in this call.
DecryptionFailure
_DecryptionFailure :: AsError a => Getting (First ServiceError) a ServiceError Source #
Secrets Manager can't decrypt the protected secret text using the provided KMS key.
EncryptionFailure
_EncryptionFailure :: AsError a => Getting (First ServiceError) a ServiceError Source #
Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the customer master key (CMK) is available, enabled, and not in an invalid state. For more information, see How Key State Affects Use of a Customer Master Key .
InvalidNextTokenException
_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError Source #
You provided an invalid NextToken
value.
InternalServiceError
_InternalServiceError :: AsError a => Getting (First ServiceError) a ServiceError Source #
An error occurred on the server side.
ResourceExistsException
_ResourceExistsException :: AsError a => Getting (First ServiceError) a ServiceError Source #
A resource with the ID you requested already exists.
ResourceNotFoundException
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source #
We can't find the resource that you asked for.
LimitExceededException
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The request failed because it would exceed one of the Secrets Manager internal limits.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
DeleteSecret
ListSecrets
UpdateSecret
RotateSecret
CreateSecret
GetSecretValue
DescribeSecret
RestoreSecret
CancelRotateSecret
PutSecretValue
GetRandomPassword
ListSecretVersionIds
TagResource
UntagResource
UpdateSecretVersionStage
Types
RotationRulesType
data RotationRulesType Source #
A structure that defines the rotation configuration for the secret.
See: rotationRulesType
smart constructor.
rotationRulesType :: RotationRulesType Source #
Creates a value of RotationRulesType
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
rrtAutomaticallyAfterDays
- Specifies the number of days between automatic scheduled rotations of the secret.
rrtAutomaticallyAfterDays :: Lens' RotationRulesType (Maybe Natural) Source #
Specifies the number of days between automatic scheduled rotations of the secret.
SecretListEntry
data SecretListEntry Source #
A structure that contains the details about a secret. It does not include the encrypted SecretString
and SecretBinary
values. To get those values, use the GetSecretValue
operation.
See: secretListEntry
smart constructor.
secretListEntry :: SecretListEntry Source #
Creates a value of SecretListEntry
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sleLastChangedDate
- The last date and time that this secret was modified in any way.sleARN
- The Amazon Resource Name (ARN) of the secret. For more information about ARNs in Secrets Manager, see Policy Resources in the AWS Secrets Manager User Guide .sleSecretVersionsToStages
- A list of all of the currently assignedSecretVersionStage
staging labels and theSecretVersionId
that each is attached to. Staging labels are used to keep track of the different versions during the rotation process.sleRotationRules
- A structure that defines the rotation configuration for the secret.sleDeletedDate
- The date and time on which this secret was deleted. Not present on active secrets. The secret can be recovered until the number of days in the recovery window has passed, as specified in theRecoveryWindowInDays
parameter of theDeleteSecret
operation.sleRotationEnabled
- Indicated whether automatic, scheduled rotation is enabled for this secret.sleKMSKeyId
- The ARN or alias of the AWS KMS customer master key (CMK) that's used to encrypt theSecretString
andSecretBinary
fields in each version of the secret. If you don't provide a key, then Secrets Manager defaults to encrypting the secret fields with the default KMS CMK (the one namedawssecretsmanager
) for this account.sleName
- The friendly name of the secret. You can use forward slashes in the name to represent a path hierarchy. For example,proddatabases/dbserver1
could represent the secret for a server nameddbserver1
in the folderdatabases
in the folderprod
.sleLastRotatedDate
- The last date and time that the rotation process for this secret was invoked.sleLastAccessedDate
- The last date that this secret was accessed. This value is truncated to midnight of the date and therefore shows only the date, not the time.sleDescription
- The user-provided description of the secret.sleRotationLambdaARN
- The ARN of an AWS Lambda function that's invoked by Secrets Manager to rotate and expire the secret either automatically per the schedule or manually by a call toRotateSecret
.sleTags
- The list of user-defined tags that are associated with the secret. To add tags to a secret, useTagResource
. To remove tags, useUntagResource
.
sleLastChangedDate :: Lens' SecretListEntry (Maybe UTCTime) Source #
The last date and time that this secret was modified in any way.
sleARN :: Lens' SecretListEntry (Maybe Text) Source #
The Amazon Resource Name (ARN) of the secret. For more information about ARNs in Secrets Manager, see Policy Resources in the AWS Secrets Manager User Guide .
sleSecretVersionsToStages :: Lens' SecretListEntry (HashMap Text (NonEmpty Text)) Source #
A list of all of the currently assigned SecretVersionStage
staging labels and the SecretVersionId
that each is attached to. Staging labels are used to keep track of the different versions during the rotation process.
sleRotationRules :: Lens' SecretListEntry (Maybe RotationRulesType) Source #
A structure that defines the rotation configuration for the secret.
sleDeletedDate :: Lens' SecretListEntry (Maybe UTCTime) Source #
The date and time on which this secret was deleted. Not present on active secrets. The secret can be recovered until the number of days in the recovery window has passed, as specified in the RecoveryWindowInDays
parameter of the DeleteSecret
operation.
sleRotationEnabled :: Lens' SecretListEntry (Maybe Bool) Source #
Indicated whether automatic, scheduled rotation is enabled for this secret.
sleKMSKeyId :: Lens' SecretListEntry (Maybe Text) Source #
The ARN or alias of the AWS KMS customer master key (CMK) that's used to encrypt the SecretString
and SecretBinary
fields in each version of the secret. If you don't provide a key, then Secrets Manager defaults to encrypting the secret fields with the default KMS CMK (the one named awssecretsmanager
) for this account.
sleName :: Lens' SecretListEntry (Maybe Text) Source #
The friendly name of the secret. You can use forward slashes in the name to represent a path hierarchy. For example, proddatabases/dbserver1
could represent the secret for a server named dbserver1
in the folder databases
in the folder prod
.
sleLastRotatedDate :: Lens' SecretListEntry (Maybe UTCTime) Source #
The last date and time that the rotation process for this secret was invoked.
sleLastAccessedDate :: Lens' SecretListEntry (Maybe UTCTime) Source #
The last date that this secret was accessed. This value is truncated to midnight of the date and therefore shows only the date, not the time.
sleDescription :: Lens' SecretListEntry (Maybe Text) Source #
The user-provided description of the secret.
sleRotationLambdaARN :: Lens' SecretListEntry (Maybe Text) Source #
The ARN of an AWS Lambda function that's invoked by Secrets Manager to rotate and expire the secret either automatically per the schedule or manually by a call to RotateSecret
.
sleTags :: Lens' SecretListEntry [Tag] Source #
The list of user-defined tags that are associated with the secret. To add tags to a secret, use TagResource
. To remove tags, use UntagResource
.
SecretVersionsListEntry
data SecretVersionsListEntry Source #
A structure that contains information about one version of a secret.
See: secretVersionsListEntry
smart constructor.
secretVersionsListEntry :: SecretVersionsListEntry Source #
Creates a value of SecretVersionsListEntry
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
svleVersionId
- The unique version identifier of this version of the secret.svleVersionStages
- An array of staging labels that are currently associated with this version of the secret.svleCreatedDate
- The date and time this version of the secret was created.svleLastAccessedDate
- The date that this version of the secret was last accessed. Note that the resolution of this field is at the date level and does not include the time.
svleVersionId :: Lens' SecretVersionsListEntry (Maybe Text) Source #
The unique version identifier of this version of the secret.
svleVersionStages :: Lens' SecretVersionsListEntry (Maybe (NonEmpty Text)) Source #
An array of staging labels that are currently associated with this version of the secret.
svleCreatedDate :: Lens' SecretVersionsListEntry (Maybe UTCTime) Source #
The date and time this version of the secret was created.
svleLastAccessedDate :: Lens' SecretVersionsListEntry (Maybe UTCTime) Source #
The date that this version of the secret was last accessed. Note that the resolution of this field is at the date level and does not include the time.
Tag
A structure that contains information about a tag.
See: tag
smart constructor.