@depup/aws-sdk__client-secrets-manager 3.1010.0-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +39 -0
- package/changes.json +42 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +511 -0
- package/dist-cjs/models/SecretsManagerServiceException.js +12 -0
- package/dist-cjs/models/errors.js +184 -0
- package/dist-cjs/runtimeConfig.browser.js +38 -0
- package/dist-cjs/runtimeConfig.js +53 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +43 -0
- package/dist-cjs/schemas/schemas_0.js +665 -0
- package/dist-es/SecretsManager.js +61 -0
- package/dist-es/SecretsManagerClient.js +50 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commands/BatchGetSecretValueCommand.js +16 -0
- package/dist-es/commands/CancelRotateSecretCommand.js +16 -0
- package/dist-es/commands/CreateSecretCommand.js +16 -0
- package/dist-es/commands/DeleteResourcePolicyCommand.js +16 -0
- package/dist-es/commands/DeleteSecretCommand.js +16 -0
- package/dist-es/commands/DescribeSecretCommand.js +16 -0
- package/dist-es/commands/GetRandomPasswordCommand.js +16 -0
- package/dist-es/commands/GetResourcePolicyCommand.js +16 -0
- package/dist-es/commands/GetSecretValueCommand.js +16 -0
- package/dist-es/commands/ListSecretVersionIdsCommand.js +16 -0
- package/dist-es/commands/ListSecretsCommand.js +16 -0
- package/dist-es/commands/PutResourcePolicyCommand.js +16 -0
- package/dist-es/commands/PutSecretValueCommand.js +16 -0
- package/dist-es/commands/RemoveRegionsFromReplicationCommand.js +16 -0
- package/dist-es/commands/ReplicateSecretToRegionsCommand.js +16 -0
- package/dist-es/commands/RestoreSecretCommand.js +16 -0
- package/dist-es/commands/RotateSecretCommand.js +16 -0
- package/dist-es/commands/StopReplicationToReplicaCommand.js +16 -0
- package/dist-es/commands/TagResourceCommand.js +16 -0
- package/dist-es/commands/UntagResourceCommand.js +16 -0
- package/dist-es/commands/UpdateSecretCommand.js +16 -0
- package/dist-es/commands/UpdateSecretVersionStageCommand.js +16 -0
- package/dist-es/commands/ValidateResourcePolicyCommand.js +16 -0
- package/dist-es/commands/index.js +23 -0
- package/dist-es/endpoint/EndpointParameters.js +13 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +9 -0
- package/dist-es/models/SecretsManagerServiceException.js +8 -0
- package/dist-es/models/enums.js +24 -0
- package/dist-es/models/errors.js +169 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/pagination/BatchGetSecretValuePaginator.js +4 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListSecretVersionIdsPaginator.js +4 -0
- package/dist-es/pagination/ListSecretsPaginator.js +4 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/runtimeConfig.browser.js +33 -0
- package/dist-es/runtimeConfig.js +48 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +39 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +661 -0
- package/dist-types/SecretsManager.d.ts +220 -0
- package/dist-types/SecretsManagerClient.d.ts +235 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/BatchGetSecretValueCommand.d.ts +210 -0
- package/dist-types/commands/CancelRotateSecretCommand.d.ts +135 -0
- package/dist-types/commands/CreateSecretCommand.d.ts +218 -0
- package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +126 -0
- package/dist-types/commands/DeleteSecretCommand.d.ts +135 -0
- package/dist-types/commands/DescribeSecretCommand.d.ts +137 -0
- package/dist-types/commands/GetRandomPasswordCommand.d.ts +135 -0
- package/dist-types/commands/GetResourcePolicyCommand.d.ts +138 -0
- package/dist-types/commands/GetSecretValueCommand.d.ts +157 -0
- package/dist-types/commands/ListSecretVersionIdsCommand.d.ts +151 -0
- package/dist-types/commands/ListSecretsCommand.d.ts +208 -0
- package/dist-types/commands/PutResourcePolicyCommand.d.ts +147 -0
- package/dist-types/commands/PutSecretValueCommand.d.ts +183 -0
- package/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts +122 -0
- package/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts +157 -0
- package/dist-types/commands/RestoreSecretCommand.d.ts +126 -0
- package/dist-types/commands/RotateSecretCommand.d.ts +180 -0
- package/dist-types/commands/StopReplicationToReplicaCommand.d.ts +111 -0
- package/dist-types/commands/TagResourceCommand.d.ts +145 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +134 -0
- package/dist-types/commands/UpdateSecretCommand.d.ts +221 -0
- package/dist-types/commands/UpdateSecretVersionStageCommand.d.ts +187 -0
- package/dist-types/commands/ValidateResourcePolicyCommand.d.ts +161 -0
- package/dist-types/commands/index.d.ts +23 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +50 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +42 -0
- package/dist-types/models/SecretsManagerServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +56 -0
- package/dist-types/models/errors.d.ts +175 -0
- package/dist-types/models/models_0.d.ts +1957 -0
- package/dist-types/pagination/BatchGetSecretValuePaginator.d.ts +7 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListSecretVersionIdsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListSecretsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/runtimeConfig.browser.d.ts +55 -0
- package/dist-types/runtimeConfig.d.ts +55 -0
- package/dist-types/runtimeConfig.native.d.ts +54 -0
- package/dist-types/runtimeConfig.shared.d.ts +27 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +99 -0
- package/dist-types/ts3.4/SecretsManager.d.ts +426 -0
- package/dist-types/ts3.4/SecretsManagerClient.d.ts +258 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/dist-types/ts3.4/commands/BatchGetSecretValueCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/CancelRotateSecretCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/CreateSecretCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeleteSecretCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/DescribeSecretCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/GetRandomPasswordCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetSecretValueCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListSecretsCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/PutSecretValueCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/RemoveRegionsFromReplicationCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/RestoreSecretCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/RotateSecretCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/StopReplicationToReplicaCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +45 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +45 -0
- package/dist-types/ts3.4/commands/UpdateSecretCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +23 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +12 -0
- package/dist-types/ts3.4/models/SecretsManagerServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +29 -0
- package/dist-types/ts3.4/models/errors.d.ts +97 -0
- package/dist-types/ts3.4/models/models_0.d.ts +333 -0
- package/dist-types/ts3.4/pagination/BatchGetSecretValuePaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListSecretVersionIdsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListSecretsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +98 -0
- package/package.json +159 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { BatchGetSecretValueRequest, BatchGetSecretValueResponse } from "../models/models_0";
|
|
4
|
+
import type { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link BatchGetSecretValueCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface BatchGetSecretValueCommandInput extends BatchGetSecretValueRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link BatchGetSecretValueCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface BatchGetSecretValueCommandOutput extends BatchGetSecretValueResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const BatchGetSecretValueCommand_base: {
|
|
25
|
+
new (input: BatchGetSecretValueCommandInput): import("@smithy/smithy-client").CommandImpl<BatchGetSecretValueCommandInput, BatchGetSecretValueCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (...[input]: [] | [BatchGetSecretValueCommandInput]): import("@smithy/smithy-client").CommandImpl<BatchGetSecretValueCommandInput, BatchGetSecretValueCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Retrieves the contents of the encrypted fields <code>SecretString</code> or
|
|
31
|
+
* <code>SecretBinary</code> for up to 20 secrets. To retrieve a single secret, call
|
|
32
|
+
* <a>GetSecretValue</a>. </p>
|
|
33
|
+
* <p>To choose which secrets to retrieve, you can specify a list of secrets by name or ARN,
|
|
34
|
+
* or you can use filters. If Secrets Manager encounters errors such as
|
|
35
|
+
* <code>AccessDeniedException</code> while attempting to retrieve any of the secrets,
|
|
36
|
+
* you can see the errors in <code>Errors</code> in the response.</p>
|
|
37
|
+
* <p>Secrets Manager generates CloudTrail
|
|
38
|
+
* <code>GetSecretValue</code> log entries for each secret you request when you call this
|
|
39
|
+
* action. Do not include sensitive information in request parameters because it might be
|
|
40
|
+
* logged. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html">Logging Secrets Manager events with CloudTrail</a>.</p>
|
|
41
|
+
* <p>
|
|
42
|
+
* <b>Required permissions: </b>
|
|
43
|
+
* <code>secretsmanager:BatchGetSecretValue</code>, and you must have
|
|
44
|
+
* <code>secretsmanager:GetSecretValue</code> for each secret. If you use filters, you
|
|
45
|
+
* must also have <code>secretsmanager:ListSecrets</code>. If the secrets are encrypted
|
|
46
|
+
* using customer-managed keys instead of the Amazon Web Services managed key
|
|
47
|
+
* <code>aws/secretsmanager</code>, then you also need <code>kms:Decrypt</code>
|
|
48
|
+
* permissions for the keys. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
|
|
49
|
+
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
|
|
50
|
+
* and access control in Secrets Manager</a>. </p>
|
|
51
|
+
* @example
|
|
52
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
53
|
+
* ```javascript
|
|
54
|
+
* import { SecretsManagerClient, BatchGetSecretValueCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
|
|
55
|
+
* // const { SecretsManagerClient, BatchGetSecretValueCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
|
|
56
|
+
* // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
|
|
57
|
+
* const config = {}; // type is SecretsManagerClientConfig
|
|
58
|
+
* const client = new SecretsManagerClient(config);
|
|
59
|
+
* const input = { // BatchGetSecretValueRequest
|
|
60
|
+
* SecretIdList: [ // SecretIdListType
|
|
61
|
+
* "STRING_VALUE",
|
|
62
|
+
* ],
|
|
63
|
+
* Filters: [ // FiltersListType
|
|
64
|
+
* { // Filter
|
|
65
|
+
* Key: "description" || "name" || "tag-key" || "tag-value" || "primary-region" || "owning-service" || "all",
|
|
66
|
+
* Values: [ // FilterValuesStringList
|
|
67
|
+
* "STRING_VALUE",
|
|
68
|
+
* ],
|
|
69
|
+
* },
|
|
70
|
+
* ],
|
|
71
|
+
* MaxResults: Number("int"),
|
|
72
|
+
* NextToken: "STRING_VALUE",
|
|
73
|
+
* };
|
|
74
|
+
* const command = new BatchGetSecretValueCommand(input);
|
|
75
|
+
* const response = await client.send(command);
|
|
76
|
+
* // { // BatchGetSecretValueResponse
|
|
77
|
+
* // SecretValues: [ // SecretValuesType
|
|
78
|
+
* // { // SecretValueEntry
|
|
79
|
+
* // ARN: "STRING_VALUE",
|
|
80
|
+
* // Name: "STRING_VALUE",
|
|
81
|
+
* // VersionId: "STRING_VALUE",
|
|
82
|
+
* // SecretBinary: new Uint8Array(),
|
|
83
|
+
* // SecretString: "STRING_VALUE",
|
|
84
|
+
* // VersionStages: [ // SecretVersionStagesType
|
|
85
|
+
* // "STRING_VALUE",
|
|
86
|
+
* // ],
|
|
87
|
+
* // CreatedDate: new Date("TIMESTAMP"),
|
|
88
|
+
* // },
|
|
89
|
+
* // ],
|
|
90
|
+
* // NextToken: "STRING_VALUE",
|
|
91
|
+
* // Errors: [ // APIErrorListType
|
|
92
|
+
* // { // APIErrorType
|
|
93
|
+
* // SecretId: "STRING_VALUE",
|
|
94
|
+
* // ErrorCode: "STRING_VALUE",
|
|
95
|
+
* // Message: "STRING_VALUE",
|
|
96
|
+
* // },
|
|
97
|
+
* // ],
|
|
98
|
+
* // };
|
|
99
|
+
*
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @param BatchGetSecretValueCommandInput - {@link BatchGetSecretValueCommandInput}
|
|
103
|
+
* @returns {@link BatchGetSecretValueCommandOutput}
|
|
104
|
+
* @see {@link BatchGetSecretValueCommandInput} for command's `input` shape.
|
|
105
|
+
* @see {@link BatchGetSecretValueCommandOutput} for command's `response` shape.
|
|
106
|
+
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link DecryptionFailure} (client fault)
|
|
109
|
+
* <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
|
|
110
|
+
*
|
|
111
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
112
|
+
* <p>An error occurred on the server side.</p>
|
|
113
|
+
*
|
|
114
|
+
* @throws {@link InvalidNextTokenException} (client fault)
|
|
115
|
+
* <p>The <code>NextToken</code> value is invalid.</p>
|
|
116
|
+
*
|
|
117
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
118
|
+
* <p>The parameter name or value is invalid.</p>
|
|
119
|
+
*
|
|
120
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
121
|
+
* <p>A parameter value is not valid for the current state of the
|
|
122
|
+
* resource.</p>
|
|
123
|
+
* <p>Possible causes:</p>
|
|
124
|
+
* <ul>
|
|
125
|
+
* <li>
|
|
126
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
127
|
+
* </li>
|
|
128
|
+
* <li>
|
|
129
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
130
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
131
|
+
* </li>
|
|
132
|
+
* <li>
|
|
133
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
134
|
+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
|
|
135
|
+
* </li>
|
|
136
|
+
* </ul>
|
|
137
|
+
*
|
|
138
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
139
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
140
|
+
*
|
|
141
|
+
* @throws {@link SecretsManagerServiceException}
|
|
142
|
+
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
143
|
+
*
|
|
144
|
+
*
|
|
145
|
+
* @example To retrieve the secret values for a group of secrets listed by name
|
|
146
|
+
* ```javascript
|
|
147
|
+
* // The following example gets the values for three secrets.
|
|
148
|
+
* const input = {
|
|
149
|
+
* SecretIdList: [
|
|
150
|
+
* "MySecret1",
|
|
151
|
+
* "MySecret2",
|
|
152
|
+
* "MySecret3"
|
|
153
|
+
* ]
|
|
154
|
+
* };
|
|
155
|
+
* const command = new BatchGetSecretValueCommand(input);
|
|
156
|
+
* const response = await client.send(command);
|
|
157
|
+
* /* response is
|
|
158
|
+
* {
|
|
159
|
+
* Errors: [],
|
|
160
|
+
* SecretValues: [
|
|
161
|
+
* {
|
|
162
|
+
* ARN: "®ion-arn;&asm-service-name;:us-west-2:&ExampleAccountId;:secret:MySecret1-a1b2c3",
|
|
163
|
+
* CreatedDate: 1.700591229801E9,
|
|
164
|
+
* Name: "MySecret1",
|
|
165
|
+
* SecretString: `{"username":"diego_ramirez","password":"EXAMPLE-PASSWORD","engine":"mysql","host":"secretsmanagertutorial.cluster.us-west-2.rds.amazonaws.com","port":3306,"dbClusterIdentifier":"secretsmanagertutorial"}`,
|
|
166
|
+
* VersionId: "a1b2c3d4-5678-90ab-cdef-EXAMPLEaaaaa",
|
|
167
|
+
* VersionStages: [
|
|
168
|
+
* "AWSCURRENT"
|
|
169
|
+
* ]
|
|
170
|
+
* },
|
|
171
|
+
* {
|
|
172
|
+
* ARN: "®ion-arn;&asm-service-name;:us-west-2:&ExampleAccountId;:secret:MySecret2-a1b2c3",
|
|
173
|
+
* CreatedDate: 1.699911394105E9,
|
|
174
|
+
* Name: "MySecret2",
|
|
175
|
+
* SecretString: `{"username":"akua_mansa","password":"EXAMPLE-PASSWORD"`,
|
|
176
|
+
* VersionId: "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb",
|
|
177
|
+
* VersionStages: [
|
|
178
|
+
* "AWSCURRENT"
|
|
179
|
+
* ]
|
|
180
|
+
* },
|
|
181
|
+
* {
|
|
182
|
+
* ARN: "®ion-arn;&asm-service-name;:us-west-2:&ExampleAccountId;:secret:MySecret3-a1b2c3",
|
|
183
|
+
* CreatedDate: 1.699911394105E9,
|
|
184
|
+
* Name: "MySecret3",
|
|
185
|
+
* SecretString: `{"username":"jie_liu","password":"EXAMPLE-PASSWORD"`,
|
|
186
|
+
* VersionId: "a1b2c3d4-5678-90ab-cdef-EXAMPLEccccc",
|
|
187
|
+
* VersionStages: [
|
|
188
|
+
* "AWSCURRENT"
|
|
189
|
+
* ]
|
|
190
|
+
* }
|
|
191
|
+
* ]
|
|
192
|
+
* }
|
|
193
|
+
* *\/
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* @public
|
|
197
|
+
*/
|
|
198
|
+
export declare class BatchGetSecretValueCommand extends BatchGetSecretValueCommand_base {
|
|
199
|
+
/** @internal type navigation helper, not in runtime. */
|
|
200
|
+
protected static __types: {
|
|
201
|
+
api: {
|
|
202
|
+
input: BatchGetSecretValueRequest;
|
|
203
|
+
output: BatchGetSecretValueResponse;
|
|
204
|
+
};
|
|
205
|
+
sdk: {
|
|
206
|
+
input: BatchGetSecretValueCommandInput;
|
|
207
|
+
output: BatchGetSecretValueCommandOutput;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { CancelRotateSecretRequest, CancelRotateSecretResponse } from "../models/models_0";
|
|
4
|
+
import type { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link CancelRotateSecretCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface CancelRotateSecretCommandInput extends CancelRotateSecretRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link CancelRotateSecretCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface CancelRotateSecretCommandOutput extends CancelRotateSecretResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const CancelRotateSecretCommand_base: {
|
|
25
|
+
new (input: CancelRotateSecretCommandInput): import("@smithy/smithy-client").CommandImpl<CancelRotateSecretCommandInput, CancelRotateSecretCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: CancelRotateSecretCommandInput): import("@smithy/smithy-client").CommandImpl<CancelRotateSecretCommandInput, CancelRotateSecretCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Turns off automatic rotation, and if a rotation is currently in progress, cancels the
|
|
31
|
+
* rotation.</p>
|
|
32
|
+
* <p>If you cancel a rotation in progress, it can leave the <code>VersionStage</code>
|
|
33
|
+
* labels in an unexpected state. You might need to remove the staging label
|
|
34
|
+
* <code>AWSPENDING</code> from the partially created version. You also need to
|
|
35
|
+
* determine whether to roll back to the previous version of the secret by moving the
|
|
36
|
+
* staging label <code>AWSCURRENT</code> to the version that has <code>AWSPENDING</code>.
|
|
37
|
+
* To determine which version has a specific staging label, call <a>ListSecretVersionIds</a>. Then use <a>UpdateSecretVersionStage</a> to change staging labels. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation
|
|
38
|
+
* works</a>.</p>
|
|
39
|
+
* <p>To turn on automatic rotation again, call <a>RotateSecret</a>.</p>
|
|
40
|
+
* <p>Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html">Logging Secrets Manager events with CloudTrail</a>.</p>
|
|
41
|
+
* <p>
|
|
42
|
+
* <b>Required permissions:
|
|
43
|
+
* </b>
|
|
44
|
+
* <code>secretsmanager:CancelRotateSecret</code>. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
|
|
45
|
+
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
|
|
46
|
+
* and access control in Secrets Manager</a>. </p>
|
|
47
|
+
* @example
|
|
48
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
49
|
+
* ```javascript
|
|
50
|
+
* import { SecretsManagerClient, CancelRotateSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
|
|
51
|
+
* // const { SecretsManagerClient, CancelRotateSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
|
|
52
|
+
* // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
|
|
53
|
+
* const config = {}; // type is SecretsManagerClientConfig
|
|
54
|
+
* const client = new SecretsManagerClient(config);
|
|
55
|
+
* const input = { // CancelRotateSecretRequest
|
|
56
|
+
* SecretId: "STRING_VALUE", // required
|
|
57
|
+
* };
|
|
58
|
+
* const command = new CancelRotateSecretCommand(input);
|
|
59
|
+
* const response = await client.send(command);
|
|
60
|
+
* // { // CancelRotateSecretResponse
|
|
61
|
+
* // ARN: "STRING_VALUE",
|
|
62
|
+
* // Name: "STRING_VALUE",
|
|
63
|
+
* // VersionId: "STRING_VALUE",
|
|
64
|
+
* // };
|
|
65
|
+
*
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @param CancelRotateSecretCommandInput - {@link CancelRotateSecretCommandInput}
|
|
69
|
+
* @returns {@link CancelRotateSecretCommandOutput}
|
|
70
|
+
* @see {@link CancelRotateSecretCommandInput} for command's `input` shape.
|
|
71
|
+
* @see {@link CancelRotateSecretCommandOutput} for command's `response` shape.
|
|
72
|
+
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
75
|
+
* <p>An error occurred on the server side.</p>
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
78
|
+
* <p>The parameter name or value is invalid.</p>
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
81
|
+
* <p>A parameter value is not valid for the current state of the
|
|
82
|
+
* resource.</p>
|
|
83
|
+
* <p>Possible causes:</p>
|
|
84
|
+
* <ul>
|
|
85
|
+
* <li>
|
|
86
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
87
|
+
* </li>
|
|
88
|
+
* <li>
|
|
89
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
90
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
91
|
+
* </li>
|
|
92
|
+
* <li>
|
|
93
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
94
|
+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
|
|
95
|
+
* </li>
|
|
96
|
+
* </ul>
|
|
97
|
+
*
|
|
98
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
99
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
100
|
+
*
|
|
101
|
+
* @throws {@link SecretsManagerServiceException}
|
|
102
|
+
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
103
|
+
*
|
|
104
|
+
*
|
|
105
|
+
* @example To cancel scheduled rotation for a secret
|
|
106
|
+
* ```javascript
|
|
107
|
+
* // The following example shows how to cancel rotation for a secret. The operation sets the RotationEnabled field to false and cancels all scheduled rotations. To resume scheduled rotations, you must re-enable rotation by calling the rotate-secret operation.
|
|
108
|
+
* const input = {
|
|
109
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
110
|
+
* };
|
|
111
|
+
* const command = new CancelRotateSecretCommand(input);
|
|
112
|
+
* const response = await client.send(command);
|
|
113
|
+
* /* response is
|
|
114
|
+
* {
|
|
115
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
116
|
+
* Name: "Name"
|
|
117
|
+
* }
|
|
118
|
+
* *\/
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
export declare class CancelRotateSecretCommand extends CancelRotateSecretCommand_base {
|
|
124
|
+
/** @internal type navigation helper, not in runtime. */
|
|
125
|
+
protected static __types: {
|
|
126
|
+
api: {
|
|
127
|
+
input: CancelRotateSecretRequest;
|
|
128
|
+
output: CancelRotateSecretResponse;
|
|
129
|
+
};
|
|
130
|
+
sdk: {
|
|
131
|
+
input: CancelRotateSecretCommandInput;
|
|
132
|
+
output: CancelRotateSecretCommandOutput;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { CreateSecretRequest, CreateSecretResponse } from "../models/models_0";
|
|
4
|
+
import type { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link CreateSecretCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface CreateSecretCommandInput extends CreateSecretRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link CreateSecretCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface CreateSecretCommandOutput extends CreateSecretResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const CreateSecretCommand_base: {
|
|
25
|
+
new (input: CreateSecretCommandInput): import("@smithy/smithy-client").CommandImpl<CreateSecretCommandInput, CreateSecretCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: CreateSecretCommandInput): import("@smithy/smithy-client").CommandImpl<CreateSecretCommandInput, CreateSecretCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Creates a new secret. A <i>secret</i> can be a password, a set of
|
|
31
|
+
* credentials such as a user name and password, an OAuth token, or other secret
|
|
32
|
+
* information that you store in an encrypted form in Secrets Manager. The secret also includes the
|
|
33
|
+
* connection information to access a database or other service, which Secrets Manager doesn't
|
|
34
|
+
* encrypt. A secret in Secrets Manager consists of both the protected secret data and the important
|
|
35
|
+
* information needed to manage the secret.</p>
|
|
36
|
+
* <p>For secrets that use <i>managed rotation</i>, you need to create the
|
|
37
|
+
* secret through the managing service. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets Manager secrets
|
|
38
|
+
* managed by other Amazon Web Services services</a>. </p>
|
|
39
|
+
* <p>For information about creating a secret in the console, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_create-basic-secret.html">Create a
|
|
40
|
+
* secret</a>.</p>
|
|
41
|
+
* <p>To create a secret, you can provide the secret value to be encrypted in either the
|
|
42
|
+
* <code>SecretString</code> parameter or the <code>SecretBinary</code> parameter, but
|
|
43
|
+
* not both. If you include <code>SecretString</code> or <code>SecretBinary</code> then
|
|
44
|
+
* Secrets Manager creates an initial secret version and automatically attaches the staging label
|
|
45
|
+
* <code>AWSCURRENT</code> to it.</p>
|
|
46
|
+
* <p>For database credentials you want to rotate, for Secrets Manager to be able to rotate the
|
|
47
|
+
* secret, you must make sure the JSON you store in the <code>SecretString</code> matches
|
|
48
|
+
* the <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_secret_json_structure.html">JSON
|
|
49
|
+
* structure of a database secret</a>.</p>
|
|
50
|
+
* <p>If you don't specify an KMS encryption key, Secrets Manager uses the Amazon Web Services managed key
|
|
51
|
+
* <code>aws/secretsmanager</code>. If this key doesn't already exist in your account,
|
|
52
|
+
* then Secrets Manager creates it for you automatically. All users and roles in the Amazon Web Services account
|
|
53
|
+
* automatically have access to use <code>aws/secretsmanager</code>. Creating
|
|
54
|
+
* <code>aws/secretsmanager</code> can result in a one-time significant delay in
|
|
55
|
+
* returning the result.</p>
|
|
56
|
+
* <p>If the secret is in a different Amazon Web Services account from the credentials calling the API,
|
|
57
|
+
* then you can't use <code>aws/secretsmanager</code> to encrypt the secret, and you must
|
|
58
|
+
* create and use a customer managed KMS key. </p>
|
|
59
|
+
* <p>Secrets Manager generates a CloudTrail log entry when you call this action.
|
|
60
|
+
* Do not include sensitive information in request parameters except
|
|
61
|
+
* <code>SecretBinary</code> or <code>SecretString</code> because it might be logged.
|
|
62
|
+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html">Logging Secrets Manager events with CloudTrail</a>.</p>
|
|
63
|
+
* <p>
|
|
64
|
+
* <b>Required permissions:
|
|
65
|
+
* </b>
|
|
66
|
+
* <code>secretsmanager:CreateSecret</code>. If you include tags in the
|
|
67
|
+
* secret, you also need <code>secretsmanager:TagResource</code>. To add replica Regions,
|
|
68
|
+
* you must also have <code>secretsmanager:ReplicateSecretToRegions</code>.
|
|
69
|
+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
|
|
70
|
+
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
|
|
71
|
+
* and access control in Secrets Manager</a>. </p>
|
|
72
|
+
* <p>To encrypt the secret with a KMS key other than <code>aws/secretsmanager</code>, you
|
|
73
|
+
* need <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permission to the
|
|
74
|
+
* key. </p>
|
|
75
|
+
* <important>
|
|
76
|
+
* <p>When you enter commands in a command shell, there is a risk of the command history being accessed or utilities having access to your command parameters. This is a concern if the command includes the value of a secret. Learn how to <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/security_cli-exposure-risks.html">Mitigate the risks of using command-line tools to store Secrets Manager secrets</a>.</p>
|
|
77
|
+
* </important>
|
|
78
|
+
* @example
|
|
79
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
80
|
+
* ```javascript
|
|
81
|
+
* import { SecretsManagerClient, CreateSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
|
|
82
|
+
* // const { SecretsManagerClient, CreateSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
|
|
83
|
+
* // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
|
|
84
|
+
* const config = {}; // type is SecretsManagerClientConfig
|
|
85
|
+
* const client = new SecretsManagerClient(config);
|
|
86
|
+
* const input = { // CreateSecretRequest
|
|
87
|
+
* Name: "STRING_VALUE", // required
|
|
88
|
+
* ClientRequestToken: "STRING_VALUE",
|
|
89
|
+
* Description: "STRING_VALUE",
|
|
90
|
+
* KmsKeyId: "STRING_VALUE",
|
|
91
|
+
* SecretBinary: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
92
|
+
* SecretString: "STRING_VALUE",
|
|
93
|
+
* Tags: [ // TagListType
|
|
94
|
+
* { // Tag
|
|
95
|
+
* Key: "STRING_VALUE",
|
|
96
|
+
* Value: "STRING_VALUE",
|
|
97
|
+
* },
|
|
98
|
+
* ],
|
|
99
|
+
* AddReplicaRegions: [ // AddReplicaRegionListType
|
|
100
|
+
* { // ReplicaRegionType
|
|
101
|
+
* Region: "STRING_VALUE",
|
|
102
|
+
* KmsKeyId: "STRING_VALUE",
|
|
103
|
+
* },
|
|
104
|
+
* ],
|
|
105
|
+
* ForceOverwriteReplicaSecret: true || false,
|
|
106
|
+
* Type: "STRING_VALUE",
|
|
107
|
+
* };
|
|
108
|
+
* const command = new CreateSecretCommand(input);
|
|
109
|
+
* const response = await client.send(command);
|
|
110
|
+
* // { // CreateSecretResponse
|
|
111
|
+
* // ARN: "STRING_VALUE",
|
|
112
|
+
* // Name: "STRING_VALUE",
|
|
113
|
+
* // VersionId: "STRING_VALUE",
|
|
114
|
+
* // ReplicationStatus: [ // ReplicationStatusListType
|
|
115
|
+
* // { // ReplicationStatusType
|
|
116
|
+
* // Region: "STRING_VALUE",
|
|
117
|
+
* // KmsKeyId: "STRING_VALUE",
|
|
118
|
+
* // Status: "InSync" || "Failed" || "InProgress",
|
|
119
|
+
* // StatusMessage: "STRING_VALUE",
|
|
120
|
+
* // LastAccessedDate: new Date("TIMESTAMP"),
|
|
121
|
+
* // },
|
|
122
|
+
* // ],
|
|
123
|
+
* // };
|
|
124
|
+
*
|
|
125
|
+
* ```
|
|
126
|
+
*
|
|
127
|
+
* @param CreateSecretCommandInput - {@link CreateSecretCommandInput}
|
|
128
|
+
* @returns {@link CreateSecretCommandOutput}
|
|
129
|
+
* @see {@link CreateSecretCommandInput} for command's `input` shape.
|
|
130
|
+
* @see {@link CreateSecretCommandOutput} for command's `response` shape.
|
|
131
|
+
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
132
|
+
*
|
|
133
|
+
* @throws {@link DecryptionFailure} (client fault)
|
|
134
|
+
* <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
|
|
135
|
+
*
|
|
136
|
+
* @throws {@link EncryptionFailure} (client fault)
|
|
137
|
+
* <p>Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the
|
|
138
|
+
* KMS key is available, enabled, and not in an invalid state. For more
|
|
139
|
+
* information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a>.</p>
|
|
140
|
+
*
|
|
141
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
142
|
+
* <p>An error occurred on the server side.</p>
|
|
143
|
+
*
|
|
144
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
145
|
+
* <p>The parameter name or value is invalid.</p>
|
|
146
|
+
*
|
|
147
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
148
|
+
* <p>A parameter value is not valid for the current state of the
|
|
149
|
+
* resource.</p>
|
|
150
|
+
* <p>Possible causes:</p>
|
|
151
|
+
* <ul>
|
|
152
|
+
* <li>
|
|
153
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
154
|
+
* </li>
|
|
155
|
+
* <li>
|
|
156
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
157
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
158
|
+
* </li>
|
|
159
|
+
* <li>
|
|
160
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
161
|
+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
|
|
162
|
+
* </li>
|
|
163
|
+
* </ul>
|
|
164
|
+
*
|
|
165
|
+
* @throws {@link LimitExceededException} (client fault)
|
|
166
|
+
* <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
|
|
167
|
+
*
|
|
168
|
+
* @throws {@link MalformedPolicyDocumentException} (client fault)
|
|
169
|
+
* <p>The resource policy has syntax errors.</p>
|
|
170
|
+
*
|
|
171
|
+
* @throws {@link PreconditionNotMetException} (client fault)
|
|
172
|
+
* <p>The request failed because you did not complete all the prerequisite steps.</p>
|
|
173
|
+
*
|
|
174
|
+
* @throws {@link ResourceExistsException} (client fault)
|
|
175
|
+
* <p>A resource with the ID you requested already exists.</p>
|
|
176
|
+
*
|
|
177
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
178
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
179
|
+
*
|
|
180
|
+
* @throws {@link SecretsManagerServiceException}
|
|
181
|
+
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
182
|
+
*
|
|
183
|
+
*
|
|
184
|
+
* @example To create a basic secret
|
|
185
|
+
* ```javascript
|
|
186
|
+
* // The following example shows how to create a secret. The credentials stored in the encrypted secret value are retrieved from a file on disk named mycreds.json.
|
|
187
|
+
* const input = {
|
|
188
|
+
* ClientRequestToken: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
|
|
189
|
+
* Description: "My test database secret created with the CLI",
|
|
190
|
+
* Name: "MyTestDatabaseSecret",
|
|
191
|
+
* SecretString: `{"username":"david","password":"EXAMPLE-PASSWORD"}`
|
|
192
|
+
* };
|
|
193
|
+
* const command = new CreateSecretCommand(input);
|
|
194
|
+
* const response = await client.send(command);
|
|
195
|
+
* /* response is
|
|
196
|
+
* {
|
|
197
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
198
|
+
* Name: "MyTestDatabaseSecret",
|
|
199
|
+
* VersionId: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1"
|
|
200
|
+
* }
|
|
201
|
+
* *\/
|
|
202
|
+
* ```
|
|
203
|
+
*
|
|
204
|
+
* @public
|
|
205
|
+
*/
|
|
206
|
+
export declare class CreateSecretCommand extends CreateSecretCommand_base {
|
|
207
|
+
/** @internal type navigation helper, not in runtime. */
|
|
208
|
+
protected static __types: {
|
|
209
|
+
api: {
|
|
210
|
+
input: CreateSecretRequest;
|
|
211
|
+
output: CreateSecretResponse;
|
|
212
|
+
};
|
|
213
|
+
sdk: {
|
|
214
|
+
input: CreateSecretCommandInput;
|
|
215
|
+
output: CreateSecretCommandOutput;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
}
|