@datafire/amazonaws_secretsmanager
Client library for AWS Secrets Manager
Installation and Usage
npm install --save @datafire/amazonaws_secretsmanager
let amazonaws_secretsmanager = require('@datafire/amazonaws_secretsmanager').create({
accessKeyId: "",
secretAccessKey: "",
region: ""
});
amazonaws_secretsmanager.CancelRotateSecret({
"SecretId": ""
}).then(data => {
console.log(data);
});
Description
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.
As an alternative to using the API directly, you can use one of the AWS SDKs, which consist of libraries and sample code for various programming languages and platforms (such as Java, Ruby, .NET, iOS, and Android). The SDKs provide a convenient way to create programmatic access to AWS Secrets Manager. For example, the SDKs take care of cryptographically signing requests, 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.
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.
Actions
CancelRotateSecret
amazonaws_secretsmanager.CancelRotateSecret({
"SecretId": ""
}, context)
Input
- input
object
- SecretId required SecretIdType
Output
- output CancelRotateSecretResponse
CreateSecret
amazonaws_secretsmanager.CreateSecret({
"Name": ""
}, context)
Input
- input
object
- ClientRequestToken ClientRequestTokenType
- Description DescriptionType
- KmsKeyId KmsKeyIdType
- Name required NameType
- SecretBinary SecretBinaryType
- SecretString SecretStringType
- Tags TagListType
Output
- output CreateSecretResponse
DeleteSecret
amazonaws_secretsmanager.DeleteSecret({
"SecretId": ""
}, context)
Input
- input
object
- RecoveryWindowInDays RecoveryWindowInDaysType
- SecretId required SecretIdType
Output
- output DeleteSecretResponse
DescribeSecret
amazonaws_secretsmanager.DescribeSecret({
"SecretId": ""
}, context)
Input
- input
object
- SecretId required SecretIdType
Output
- output DescribeSecretResponse
GetRandomPassword
amazonaws_secretsmanager.GetRandomPassword({}, context)
Input
- input
object
- ExcludeCharacters ExcludeCharactersType
- ExcludeLowercase ExcludeLowercaseType
- ExcludeNumbers ExcludeNumbersType
- ExcludePunctuation ExcludePunctuationType
- ExcludeUppercase ExcludeUppercaseType
- IncludeSpace IncludeSpaceType
- PasswordLength PasswordLengthType
- RequireEachIncludedType RequireEachIncludedTypeType
Output
- output GetRandomPasswordResponse
GetSecretValue
amazonaws_secretsmanager.GetSecretValue({
"SecretId": ""
}, context)
Input
- input
object
- SecretId required SecretIdType
- VersionId SecretVersionIdType
- VersionStage SecretVersionStageType
Output
- output GetSecretValueResponse
ListSecretVersionIds
amazonaws_secretsmanager.ListSecretVersionIds({
"SecretId": ""
}, context)
Input
- input
object
- MaxResults
string
- NextToken
string
- IncludeDeprecated BooleanType
- MaxResults MaxResultsType
- NextToken NextTokenType
- SecretId required SecretIdType
- MaxResults
Output
- output ListSecretVersionIdsResponse
ListSecrets
amazonaws_secretsmanager.ListSecrets({}, context)
Input
- input
object
- MaxResults
string
- NextToken
string
- MaxResults MaxResultsType
- NextToken NextTokenType
- MaxResults
Output
- output ListSecretsResponse
PutSecretValue
amazonaws_secretsmanager.PutSecretValue({
"SecretId": ""
}, context)
Input
- input
object
- ClientRequestToken ClientRequestTokenType
- SecretBinary SecretBinaryType
- SecretId required SecretIdType
- SecretString SecretStringType
- VersionStages SecretVersionStagesType
Output
- output PutSecretValueResponse
RestoreSecret
amazonaws_secretsmanager.RestoreSecret({
"SecretId": ""
}, context)
Input
- input
object
- SecretId required SecretIdType
Output
- output RestoreSecretResponse
RotateSecret
amazonaws_secretsmanager.RotateSecret({
"SecretId": ""
}, context)
Input
- input
object
- ClientRequestToken ClientRequestTokenType
- RotationLambdaARN RotationLambdaARNType
- RotationRules RotationRulesType
- SecretId required SecretIdType
Output
- output RotateSecretResponse
TagResource
amazonaws_secretsmanager.TagResource({
"SecretId": "",
"Tags": []
}, context)
Input
- input
object
- SecretId required SecretIdType
- Tags required TagListType
Output
Output schema unknown
UntagResource
amazonaws_secretsmanager.UntagResource({
"SecretId": "",
"TagKeys": []
}, context)
Input
- input
object
- SecretId required SecretIdType
- TagKeys required TagKeyListType
Output
Output schema unknown
UpdateSecret
amazonaws_secretsmanager.UpdateSecret({
"SecretId": ""
}, context)
Input
- input
object
- ClientRequestToken ClientRequestTokenType
- Description DescriptionType
- KmsKeyId KmsKeyIdType
- SecretBinary SecretBinaryType
- SecretId required SecretIdType
- SecretString SecretStringType
Output
- output UpdateSecretResponse
UpdateSecretVersionStage
amazonaws_secretsmanager.UpdateSecretVersionStage({
"SecretId": "",
"VersionStage": ""
}, context)
Input
- input
object
- MoveToVersionId SecretVersionIdType
- RemoveFromVersionId SecretVersionIdType
- SecretId required SecretIdType
- VersionStage required SecretVersionStageType
Output
Definitions
AutomaticallyRotateAfterDaysType
- AutomaticallyRotateAfterDaysType
integer
BooleanType
- BooleanType
boolean
CancelRotateSecretRequest
- CancelRotateSecretRequest
object
- SecretId required SecretIdType
CancelRotateSecretResponse
- CancelRotateSecretResponse
object
- ARN SecretARNType
- Name SecretNameType
- VersionId SecretVersionIdType
ClientRequestTokenType
- ClientRequestTokenType
string
CreateSecretRequest
- CreateSecretRequest
object
- ClientRequestToken ClientRequestTokenType
- Description DescriptionType
- KmsKeyId KmsKeyIdType
- Name required NameType
- SecretBinary SecretBinaryType
- SecretString SecretStringType
- Tags TagListType
CreateSecretResponse
- CreateSecretResponse
object
- ARN SecretARNType
- Name SecretNameType
- VersionId SecretVersionIdType
CreatedDateType
- CreatedDateType
string
DecryptionFailure
- DecryptionFailure
object
: Secrets Manager can't decrypt the protected secret text using the provided KMS key.- Message ErrorMessage
DeleteSecretRequest
- DeleteSecretRequest
object
- RecoveryWindowInDays RecoveryWindowInDaysType
- SecretId required SecretIdType
DeleteSecretResponse
- DeleteSecretResponse
object
- ARN SecretARNType
- DeletionDate DeletionDateType
- Name SecretNameType
DeletedDateType
- DeletedDateType
string
DeletionDateType
- DeletionDateType
string
DescribeSecretRequest
- DescribeSecretRequest
object
- SecretId required SecretIdType
DescribeSecretResponse
- DescribeSecretResponse
object
- ARN SecretARNType
- DeletedDate DeletedDateType
- Description DescriptionType
- KmsKeyId KmsKeyIdType
- LastAccessedDate LastAccessedDateType
- LastChangedDate LastChangedDateType
- LastRotatedDate LastRotatedDateType
- Name SecretNameType
- RotationEnabled RotationEnabledType
- RotationLambdaARN RotationLambdaARNType
- RotationRules RotationRulesType
- Tags TagListType
- VersionIdsToStages SecretVersionsToStagesMapType
DescriptionType
- DescriptionType
string
EncryptionFailure
- EncryptionFailure
object
: 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.- Message ErrorMessage
ErrorMessage
- ErrorMessage
string
ExcludeCharactersType
- ExcludeCharactersType
string
ExcludeLowercaseType
- ExcludeLowercaseType
boolean
ExcludeNumbersType
- ExcludeNumbersType
boolean
ExcludePunctuationType
- ExcludePunctuationType
boolean
ExcludeUppercaseType
- ExcludeUppercaseType
boolean
GetRandomPasswordRequest
- GetRandomPasswordRequest
object
- ExcludeCharacters ExcludeCharactersType
- ExcludeLowercase ExcludeLowercaseType
- ExcludeNumbers ExcludeNumbersType
- ExcludePunctuation ExcludePunctuationType
- ExcludeUppercase ExcludeUppercaseType
- IncludeSpace IncludeSpaceType
- PasswordLength PasswordLengthType
- RequireEachIncludedType RequireEachIncludedTypeType
GetRandomPasswordResponse
- GetRandomPasswordResponse
object
- RandomPassword RandomPasswordType
GetSecretValueRequest
- GetSecretValueRequest
object
- SecretId required SecretIdType
- VersionId SecretVersionIdType
- VersionStage SecretVersionStageType
GetSecretValueResponse
- GetSecretValueResponse
object
- ARN SecretARNType
- CreatedDate CreatedDateType
- Name SecretNameType
- SecretBinary SecretBinaryType
- SecretString SecretStringType
- VersionId SecretVersionIdType
- VersionStages SecretVersionStagesType
IncludeSpaceType
- IncludeSpaceType
boolean
InternalServiceError
- InternalServiceError
object
: An error occurred on the server side.- Message ErrorMessage
InvalidNextTokenException
- InvalidNextTokenException
object
: You provided an invalidNextToken
value.- Message ErrorMessage
InvalidParameterException
- InvalidParameterException
object
: You provided an invalid value for a parameter.- Message ErrorMessage
InvalidRequestException
- InvalidRequestException
object
: 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.- Message ErrorMessage
KmsKeyIdType
- KmsKeyIdType
string
LastAccessedDateType
- LastAccessedDateType
string
LastChangedDateType
- LastChangedDateType
string
LastRotatedDateType
- LastRotatedDateType
string
LimitExceededException
- LimitExceededException
object
: The request failed because it would exceed one of the Secrets Manager internal limits.- Message ErrorMessage
ListSecretVersionIdsRequest
- ListSecretVersionIdsRequest
object
- IncludeDeprecated BooleanType
- MaxResults MaxResultsType
- NextToken NextTokenType
- SecretId required SecretIdType
ListSecretVersionIdsResponse
- ListSecretVersionIdsResponse
object
- ARN SecretARNType
- Name SecretNameType
- NextToken NextTokenType
- Versions SecretVersionsListType
ListSecretsRequest
- ListSecretsRequest
object
- MaxResults MaxResultsType
- NextToken NextTokenType
ListSecretsResponse
- ListSecretsResponse
object
- NextToken NextTokenType
- SecretList SecretListType
MalformedPolicyDocumentException
- MalformedPolicyDocumentException
object
: The policy document that you provided isn't valid.- Message ErrorMessage
MaxResultsType
- MaxResultsType
integer
NameType
- NameType
string
NextTokenType
- NextTokenType
string
PasswordLengthType
- PasswordLengthType
integer
PutSecretValueRequest
- PutSecretValueRequest
object
- ClientRequestToken ClientRequestTokenType
- SecretBinary SecretBinaryType
- SecretId required SecretIdType
- SecretString SecretStringType
- VersionStages SecretVersionStagesType
PutSecretValueResponse
- PutSecretValueResponse
object
- ARN SecretARNType
- Name SecretNameType
- VersionId SecretVersionIdType
- VersionStages SecretVersionStagesType
RandomPasswordType
- RandomPasswordType
string
RecoveryWindowInDaysType
- RecoveryWindowInDaysType
integer
RequireEachIncludedTypeType
- RequireEachIncludedTypeType
boolean
ResourceExistsException
- ResourceExistsException
object
: A resource with the ID you requested already exists.- Message ErrorMessage
ResourceNotFoundException
- ResourceNotFoundException
object
: We can't find the resource that you asked for.- Message ErrorMessage
RestoreSecretRequest
- RestoreSecretRequest
object
- SecretId required SecretIdType
RestoreSecretResponse
- RestoreSecretResponse
object
- ARN SecretARNType
- Name SecretNameType
RotateSecretRequest
- RotateSecretRequest
object
- ClientRequestToken ClientRequestTokenType
- RotationLambdaARN RotationLambdaARNType
- RotationRules RotationRulesType
- SecretId required SecretIdType
RotateSecretResponse
- RotateSecretResponse
object
- ARN SecretARNType
- Name SecretNameType
- VersionId SecretVersionIdType
RotationEnabledType
- RotationEnabledType
boolean
RotationLambdaARNType
- RotationLambdaARNType
string
RotationRulesType
- RotationRulesType
object
: A structure that defines the rotation configuration for the secret.- AutomaticallyAfterDays AutomaticallyRotateAfterDaysType
SecretARNType
- SecretARNType
string
SecretBinaryType
- SecretBinaryType
string
SecretIdType
- SecretIdType
string
SecretListEntry
- SecretListEntry
object
: A structure that contains the details about a secret. It does not include the encryptedSecretString
andSecretBinary
values. To get those values, use the GetSecretValue operation.- ARN SecretARNType
- DeletedDate DeletedDateType
- Description DescriptionType
- KmsKeyId KmsKeyIdType
- LastAccessedDate LastAccessedDateType
- LastChangedDate LastChangedDateType
- LastRotatedDate LastRotatedDateType
- Name SecretNameType
- RotationEnabled RotationEnabledType
- RotationLambdaARN RotationLambdaARNType
- RotationRules RotationRulesType
- SecretVersionsToStages SecretVersionsToStagesMapType
- Tags TagListType
SecretListType
- SecretListType
array
- items SecretListEntry
SecretNameType
- SecretNameType
string
SecretStringType
- SecretStringType
string
SecretVersionIdType
- SecretVersionIdType
string
SecretVersionStageType
- SecretVersionStageType
string
SecretVersionStagesType
- SecretVersionStagesType
array
- items SecretVersionStageType
SecretVersionsListEntry
- SecretVersionsListEntry
object
: A structure that contains information about one version of a secret.- CreatedDate CreatedDateType
- LastAccessedDate LastAccessedDateType
- VersionId SecretVersionIdType
- VersionStages SecretVersionStagesType
SecretVersionsListType
- SecretVersionsListType
array
- items SecretVersionsListEntry
SecretVersionsToStagesMapType
- SecretVersionsToStagesMapType
array
- items
object
- key SecretVersionIdType
- value SecretVersionStagesType
- items
Tag
- Tag
object
: A structure that contains information about a tag.- Key TagKeyType
- Value TagValueType
TagKeyListType
- TagKeyListType
array
- items TagKeyType
TagKeyType
- TagKeyType
string
TagListType
- TagListType
array
- items Tag
TagResourceRequest
- TagResourceRequest
object
- SecretId required SecretIdType
- Tags required TagListType
TagValueType
- TagValueType
string
UntagResourceRequest
- UntagResourceRequest
object
- SecretId required SecretIdType
- TagKeys required TagKeyListType
UpdateSecretRequest
- UpdateSecretRequest
object
- ClientRequestToken ClientRequestTokenType
- Description DescriptionType
- KmsKeyId KmsKeyIdType
- SecretBinary SecretBinaryType
- SecretId required SecretIdType
- SecretString SecretStringType
UpdateSecretResponse
- UpdateSecretResponse
object
- ARN SecretARNType
- Name SecretNameType
- VersionId SecretVersionIdType
UpdateSecretVersionStageRequest
- UpdateSecretVersionStageRequest
object
- MoveToVersionId SecretVersionIdType
- RemoveFromVersionId SecretVersionIdType
- SecretId required SecretIdType
- VersionStage required SecretVersionStageType
UpdateSecretVersionStageResponse
- UpdateSecretVersionStageResponse
object
- ARN SecretARNType
- Name SecretNameType