@aws-sdk/client-secrets-manager 3.451.0 → 3.458.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/README.md +30 -22
- package/dist-cjs/SecretsManager.js +2 -0
- package/dist-cjs/commands/BatchGetSecretValueCommand.js +52 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +49 -38
- package/dist-cjs/pagination/BatchGetSecretValuePaginator.js +29 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_json1_1.js +82 -1
- package/dist-es/SecretsManager.js +2 -0
- package/dist-es/commands/BatchGetSecretValueCommand.js +48 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +44 -35
- package/dist-es/pagination/BatchGetSecretValuePaginator.js +25 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +79 -0
- package/dist-types/SecretsManager.d.ts +7 -0
- package/dist-types/SecretsManagerClient.d.ts +3 -2
- package/dist-types/commands/BatchGetSecretValueCommand.d.ts +147 -0
- package/dist-types/commands/GetSecretValueCommand.d.ts +1 -0
- package/dist-types/commands/ListSecretsCommand.d.ts +1 -2
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +232 -106
- package/dist-types/pagination/BatchGetSecretValuePaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/SecretsManager.d.ts +17 -0
- package/dist-types/ts3.4/SecretsManagerClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/BatchGetSecretValueCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +63 -32
- package/dist-types/ts3.4/pagination/BatchGetSecretValuePaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
- package/package.json +3 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { BatchGetSecretValueResponseFilterSensitiveLog, } from "../models/models_0";
|
|
6
|
+
import { de_BatchGetSecretValueCommand, se_BatchGetSecretValueCommand } from "../protocols/Aws_json1_1";
|
|
7
|
+
export { $Command };
|
|
8
|
+
export class BatchGetSecretValueCommand extends $Command {
|
|
9
|
+
static getEndpointParameterInstructions() {
|
|
10
|
+
return {
|
|
11
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
12
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
13
|
+
Region: { type: "builtInParams", name: "region" },
|
|
14
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
constructor(input) {
|
|
18
|
+
super();
|
|
19
|
+
this.input = input;
|
|
20
|
+
}
|
|
21
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
22
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
23
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, BatchGetSecretValueCommand.getEndpointParameterInstructions()));
|
|
24
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
25
|
+
const { logger } = configuration;
|
|
26
|
+
const clientName = "SecretsManagerClient";
|
|
27
|
+
const commandName = "BatchGetSecretValueCommand";
|
|
28
|
+
const handlerExecutionContext = {
|
|
29
|
+
logger,
|
|
30
|
+
clientName,
|
|
31
|
+
commandName,
|
|
32
|
+
inputFilterSensitiveLog: (_) => _,
|
|
33
|
+
outputFilterSensitiveLog: BatchGetSecretValueResponseFilterSensitiveLog,
|
|
34
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
35
|
+
service: "secretsmanager",
|
|
36
|
+
operation: "BatchGetSecretValue",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const { requestHandler } = configuration;
|
|
40
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
41
|
+
}
|
|
42
|
+
serialize(input, context) {
|
|
43
|
+
return se_BatchGetSecretValueCommand(input, context);
|
|
44
|
+
}
|
|
45
|
+
deserialize(output, context) {
|
|
46
|
+
return de_BatchGetSecretValueCommand(output, context);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import { SENSITIVE_STRING } from "@smithy/smithy-client";
|
|
2
2
|
import { SecretsManagerServiceException as __BaseException } from "./SecretsManagerServiceException";
|
|
3
|
+
export const FilterNameStringType = {
|
|
4
|
+
all: "all",
|
|
5
|
+
description: "description",
|
|
6
|
+
name: "name",
|
|
7
|
+
owning_service: "owning-service",
|
|
8
|
+
primary_region: "primary-region",
|
|
9
|
+
tag_key: "tag-key",
|
|
10
|
+
tag_value: "tag-value",
|
|
11
|
+
};
|
|
12
|
+
export class DecryptionFailure extends __BaseException {
|
|
13
|
+
constructor(opts) {
|
|
14
|
+
super({
|
|
15
|
+
name: "DecryptionFailure",
|
|
16
|
+
$fault: "client",
|
|
17
|
+
...opts,
|
|
18
|
+
});
|
|
19
|
+
this.name = "DecryptionFailure";
|
|
20
|
+
this.$fault = "client";
|
|
21
|
+
Object.setPrototypeOf(this, DecryptionFailure.prototype);
|
|
22
|
+
this.Message = opts.Message;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
3
25
|
export class InternalServiceError extends __BaseException {
|
|
4
26
|
constructor(opts) {
|
|
5
27
|
super({
|
|
@@ -13,6 +35,19 @@ export class InternalServiceError extends __BaseException {
|
|
|
13
35
|
this.Message = opts.Message;
|
|
14
36
|
}
|
|
15
37
|
}
|
|
38
|
+
export class InvalidNextTokenException extends __BaseException {
|
|
39
|
+
constructor(opts) {
|
|
40
|
+
super({
|
|
41
|
+
name: "InvalidNextTokenException",
|
|
42
|
+
$fault: "client",
|
|
43
|
+
...opts,
|
|
44
|
+
});
|
|
45
|
+
this.name = "InvalidNextTokenException";
|
|
46
|
+
this.$fault = "client";
|
|
47
|
+
Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
|
|
48
|
+
this.Message = opts.Message;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
16
51
|
export class InvalidParameterException extends __BaseException {
|
|
17
52
|
constructor(opts) {
|
|
18
53
|
super({
|
|
@@ -57,19 +92,6 @@ export const StatusType = {
|
|
|
57
92
|
InProgress: "InProgress",
|
|
58
93
|
InSync: "InSync",
|
|
59
94
|
};
|
|
60
|
-
export class DecryptionFailure extends __BaseException {
|
|
61
|
-
constructor(opts) {
|
|
62
|
-
super({
|
|
63
|
-
name: "DecryptionFailure",
|
|
64
|
-
$fault: "client",
|
|
65
|
-
...opts,
|
|
66
|
-
});
|
|
67
|
-
this.name = "DecryptionFailure";
|
|
68
|
-
this.$fault = "client";
|
|
69
|
-
Object.setPrototypeOf(this, DecryptionFailure.prototype);
|
|
70
|
-
this.Message = opts.Message;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
95
|
export class EncryptionFailure extends __BaseException {
|
|
74
96
|
constructor(opts) {
|
|
75
97
|
super({
|
|
@@ -135,28 +157,6 @@ export class ResourceExistsException extends __BaseException {
|
|
|
135
157
|
this.Message = opts.Message;
|
|
136
158
|
}
|
|
137
159
|
}
|
|
138
|
-
export const FilterNameStringType = {
|
|
139
|
-
all: "all",
|
|
140
|
-
description: "description",
|
|
141
|
-
name: "name",
|
|
142
|
-
owning_service: "owning-service",
|
|
143
|
-
primary_region: "primary-region",
|
|
144
|
-
tag_key: "tag-key",
|
|
145
|
-
tag_value: "tag-value",
|
|
146
|
-
};
|
|
147
|
-
export class InvalidNextTokenException extends __BaseException {
|
|
148
|
-
constructor(opts) {
|
|
149
|
-
super({
|
|
150
|
-
name: "InvalidNextTokenException",
|
|
151
|
-
$fault: "client",
|
|
152
|
-
...opts,
|
|
153
|
-
});
|
|
154
|
-
this.name = "InvalidNextTokenException";
|
|
155
|
-
this.$fault = "client";
|
|
156
|
-
Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
|
|
157
|
-
this.Message = opts.Message;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
160
|
export const SortOrderType = {
|
|
161
161
|
asc: "asc",
|
|
162
162
|
desc: "desc",
|
|
@@ -174,6 +174,15 @@ export class PublicPolicyException extends __BaseException {
|
|
|
174
174
|
this.Message = opts.Message;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
+
export const SecretValueEntryFilterSensitiveLog = (obj) => ({
|
|
178
|
+
...obj,
|
|
179
|
+
...(obj.SecretBinary && { SecretBinary: SENSITIVE_STRING }),
|
|
180
|
+
...(obj.SecretString && { SecretString: SENSITIVE_STRING }),
|
|
181
|
+
});
|
|
182
|
+
export const BatchGetSecretValueResponseFilterSensitiveLog = (obj) => ({
|
|
183
|
+
...obj,
|
|
184
|
+
...(obj.SecretValues && { SecretValues: obj.SecretValues.map((item) => SecretValueEntryFilterSensitiveLog(item)) }),
|
|
185
|
+
});
|
|
177
186
|
export const CreateSecretRequestFilterSensitiveLog = (obj) => ({
|
|
178
187
|
...obj,
|
|
179
188
|
...(obj.SecretBinary && { SecretBinary: SENSITIVE_STRING }),
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BatchGetSecretValueCommand, } from "../commands/BatchGetSecretValueCommand";
|
|
2
|
+
import { SecretsManagerClient } from "../SecretsManagerClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new BatchGetSecretValueCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateBatchGetSecretValue(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.NextToken = token;
|
|
12
|
+
input["MaxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof SecretsManagerClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected SecretsManager | SecretsManagerClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.NextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -3,6 +3,12 @@ import { _json, collectBody, decorateServiceException as __decorateServiceExcept
|
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { DecryptionFailure, EncryptionFailure, InternalServiceError, InvalidNextTokenException, InvalidParameterException, InvalidRequestException, LimitExceededException, MalformedPolicyDocumentException, PreconditionNotMetException, PublicPolicyException, ResourceExistsException, ResourceNotFoundException, } from "../models/models_0";
|
|
5
5
|
import { SecretsManagerServiceException as __BaseException } from "../models/SecretsManagerServiceException";
|
|
6
|
+
export const se_BatchGetSecretValueCommand = async (input, context) => {
|
|
7
|
+
const headers = sharedHeaders("BatchGetSecretValue");
|
|
8
|
+
let body;
|
|
9
|
+
body = JSON.stringify(_json(input));
|
|
10
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
11
|
+
};
|
|
6
12
|
export const se_CancelRotateSecretCommand = async (input, context) => {
|
|
7
13
|
const headers = sharedHeaders("CancelRotateSecret");
|
|
8
14
|
let body;
|
|
@@ -135,6 +141,53 @@ export const se_ValidateResourcePolicyCommand = async (input, context) => {
|
|
|
135
141
|
body = JSON.stringify(_json(input));
|
|
136
142
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
137
143
|
};
|
|
144
|
+
export const de_BatchGetSecretValueCommand = async (output, context) => {
|
|
145
|
+
if (output.statusCode >= 300) {
|
|
146
|
+
return de_BatchGetSecretValueCommandError(output, context);
|
|
147
|
+
}
|
|
148
|
+
const data = await parseBody(output.body, context);
|
|
149
|
+
let contents = {};
|
|
150
|
+
contents = de_BatchGetSecretValueResponse(data, context);
|
|
151
|
+
const response = {
|
|
152
|
+
$metadata: deserializeMetadata(output),
|
|
153
|
+
...contents,
|
|
154
|
+
};
|
|
155
|
+
return response;
|
|
156
|
+
};
|
|
157
|
+
const de_BatchGetSecretValueCommandError = async (output, context) => {
|
|
158
|
+
const parsedOutput = {
|
|
159
|
+
...output,
|
|
160
|
+
body: await parseErrorBody(output.body, context),
|
|
161
|
+
};
|
|
162
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
163
|
+
switch (errorCode) {
|
|
164
|
+
case "DecryptionFailure":
|
|
165
|
+
case "com.amazonaws.secretsmanager#DecryptionFailure":
|
|
166
|
+
throw await de_DecryptionFailureRes(parsedOutput, context);
|
|
167
|
+
case "InternalServiceError":
|
|
168
|
+
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
169
|
+
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
170
|
+
case "InvalidNextTokenException":
|
|
171
|
+
case "com.amazonaws.secretsmanager#InvalidNextTokenException":
|
|
172
|
+
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
173
|
+
case "InvalidParameterException":
|
|
174
|
+
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
175
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
176
|
+
case "InvalidRequestException":
|
|
177
|
+
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
178
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
179
|
+
case "ResourceNotFoundException":
|
|
180
|
+
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
181
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
182
|
+
default:
|
|
183
|
+
const parsedBody = parsedOutput.body;
|
|
184
|
+
return throwDefaultError({
|
|
185
|
+
output,
|
|
186
|
+
parsedBody,
|
|
187
|
+
errorCode,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
};
|
|
138
191
|
export const de_CancelRotateSecretCommand = async (output, context) => {
|
|
139
192
|
if (output.statusCode >= 300) {
|
|
140
193
|
return de_CancelRotateSecretCommandError(output, context);
|
|
@@ -1237,6 +1290,13 @@ const se_UpdateSecretRequest = (input, context) => {
|
|
|
1237
1290
|
SecretString: [],
|
|
1238
1291
|
});
|
|
1239
1292
|
};
|
|
1293
|
+
const de_BatchGetSecretValueResponse = (output, context) => {
|
|
1294
|
+
return take(output, {
|
|
1295
|
+
Errors: _json,
|
|
1296
|
+
NextToken: __expectString,
|
|
1297
|
+
SecretValues: (_) => de_SecretValuesType(_, context),
|
|
1298
|
+
});
|
|
1299
|
+
};
|
|
1240
1300
|
const de_CreateSecretResponse = (output, context) => {
|
|
1241
1301
|
return take(output, {
|
|
1242
1302
|
ARN: __expectString,
|
|
@@ -1357,6 +1417,25 @@ const de_SecretListType = (output, context) => {
|
|
|
1357
1417
|
});
|
|
1358
1418
|
return retVal;
|
|
1359
1419
|
};
|
|
1420
|
+
const de_SecretValueEntry = (output, context) => {
|
|
1421
|
+
return take(output, {
|
|
1422
|
+
ARN: __expectString,
|
|
1423
|
+
CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1424
|
+
Name: __expectString,
|
|
1425
|
+
SecretBinary: context.base64Decoder,
|
|
1426
|
+
SecretString: __expectString,
|
|
1427
|
+
VersionId: __expectString,
|
|
1428
|
+
VersionStages: _json,
|
|
1429
|
+
});
|
|
1430
|
+
};
|
|
1431
|
+
const de_SecretValuesType = (output, context) => {
|
|
1432
|
+
const retVal = (output || [])
|
|
1433
|
+
.filter((e) => e != null)
|
|
1434
|
+
.map((entry) => {
|
|
1435
|
+
return de_SecretValueEntry(entry, context);
|
|
1436
|
+
});
|
|
1437
|
+
return retVal;
|
|
1438
|
+
};
|
|
1360
1439
|
const de_SecretVersionsListEntry = (output, context) => {
|
|
1361
1440
|
return take(output, {
|
|
1362
1441
|
CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { BatchGetSecretValueCommandInput, BatchGetSecretValueCommandOutput } from "./commands/BatchGetSecretValueCommand";
|
|
2
3
|
import { CancelRotateSecretCommandInput, CancelRotateSecretCommandOutput } from "./commands/CancelRotateSecretCommand";
|
|
3
4
|
import { CreateSecretCommandInput, CreateSecretCommandOutput } from "./commands/CreateSecretCommand";
|
|
4
5
|
import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "./commands/DeleteResourcePolicyCommand";
|
|
@@ -23,6 +24,12 @@ import { UpdateSecretVersionStageCommandInput, UpdateSecretVersionStageCommandOu
|
|
|
23
24
|
import { ValidateResourcePolicyCommandInput, ValidateResourcePolicyCommandOutput } from "./commands/ValidateResourcePolicyCommand";
|
|
24
25
|
import { SecretsManagerClient } from "./SecretsManagerClient";
|
|
25
26
|
export interface SecretsManager {
|
|
27
|
+
/**
|
|
28
|
+
* @see {@link BatchGetSecretValueCommand}
|
|
29
|
+
*/
|
|
30
|
+
batchGetSecretValue(args: BatchGetSecretValueCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetSecretValueCommandOutput>;
|
|
31
|
+
batchGetSecretValue(args: BatchGetSecretValueCommandInput, cb: (err: any, data?: BatchGetSecretValueCommandOutput) => void): void;
|
|
32
|
+
batchGetSecretValue(args: BatchGetSecretValueCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetSecretValueCommandOutput) => void): void;
|
|
26
33
|
/**
|
|
27
34
|
* @see {@link CancelRotateSecretCommand}
|
|
28
35
|
*/
|
|
@@ -8,6 +8,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"
|
|
|
8
8
|
import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
9
9
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
10
10
|
import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
11
|
+
import { BatchGetSecretValueCommandInput, BatchGetSecretValueCommandOutput } from "./commands/BatchGetSecretValueCommand";
|
|
11
12
|
import { CancelRotateSecretCommandInput, CancelRotateSecretCommandOutput } from "./commands/CancelRotateSecretCommand";
|
|
12
13
|
import { CreateSecretCommandInput, CreateSecretCommandOutput } from "./commands/CreateSecretCommand";
|
|
13
14
|
import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "./commands/DeleteResourcePolicyCommand";
|
|
@@ -36,11 +37,11 @@ export { __Client };
|
|
|
36
37
|
/**
|
|
37
38
|
* @public
|
|
38
39
|
*/
|
|
39
|
-
export type ServiceInputTypes = CancelRotateSecretCommandInput | CreateSecretCommandInput | DeleteResourcePolicyCommandInput | DeleteSecretCommandInput | DescribeSecretCommandInput | GetRandomPasswordCommandInput | GetResourcePolicyCommandInput | GetSecretValueCommandInput | ListSecretVersionIdsCommandInput | ListSecretsCommandInput | PutResourcePolicyCommandInput | PutSecretValueCommandInput | RemoveRegionsFromReplicationCommandInput | ReplicateSecretToRegionsCommandInput | RestoreSecretCommandInput | RotateSecretCommandInput | StopReplicationToReplicaCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateSecretCommandInput | UpdateSecretVersionStageCommandInput | ValidateResourcePolicyCommandInput;
|
|
40
|
+
export type ServiceInputTypes = BatchGetSecretValueCommandInput | CancelRotateSecretCommandInput | CreateSecretCommandInput | DeleteResourcePolicyCommandInput | DeleteSecretCommandInput | DescribeSecretCommandInput | GetRandomPasswordCommandInput | GetResourcePolicyCommandInput | GetSecretValueCommandInput | ListSecretVersionIdsCommandInput | ListSecretsCommandInput | PutResourcePolicyCommandInput | PutSecretValueCommandInput | RemoveRegionsFromReplicationCommandInput | ReplicateSecretToRegionsCommandInput | RestoreSecretCommandInput | RotateSecretCommandInput | StopReplicationToReplicaCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateSecretCommandInput | UpdateSecretVersionStageCommandInput | ValidateResourcePolicyCommandInput;
|
|
40
41
|
/**
|
|
41
42
|
* @public
|
|
42
43
|
*/
|
|
43
|
-
export type ServiceOutputTypes = CancelRotateSecretCommandOutput | CreateSecretCommandOutput | DeleteResourcePolicyCommandOutput | DeleteSecretCommandOutput | DescribeSecretCommandOutput | GetRandomPasswordCommandOutput | GetResourcePolicyCommandOutput | GetSecretValueCommandOutput | ListSecretVersionIdsCommandOutput | ListSecretsCommandOutput | PutResourcePolicyCommandOutput | PutSecretValueCommandOutput | RemoveRegionsFromReplicationCommandOutput | ReplicateSecretToRegionsCommandOutput | RestoreSecretCommandOutput | RotateSecretCommandOutput | StopReplicationToReplicaCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateSecretCommandOutput | UpdateSecretVersionStageCommandOutput | ValidateResourcePolicyCommandOutput;
|
|
44
|
+
export type ServiceOutputTypes = BatchGetSecretValueCommandOutput | CancelRotateSecretCommandOutput | CreateSecretCommandOutput | DeleteResourcePolicyCommandOutput | DeleteSecretCommandOutput | DescribeSecretCommandOutput | GetRandomPasswordCommandOutput | GetResourcePolicyCommandOutput | GetSecretValueCommandOutput | ListSecretVersionIdsCommandOutput | ListSecretsCommandOutput | PutResourcePolicyCommandOutput | PutSecretValueCommandOutput | RemoveRegionsFromReplicationCommandOutput | ReplicateSecretToRegionsCommandOutput | RestoreSecretCommandOutput | RotateSecretCommandOutput | StopReplicationToReplicaCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateSecretCommandOutput | UpdateSecretVersionStageCommandOutput | ValidateResourcePolicyCommandOutput;
|
|
44
45
|
/**
|
|
45
46
|
* @public
|
|
46
47
|
*/
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
|
+
import { BatchGetSecretValueRequest, BatchGetSecretValueResponse } from "../models/models_0";
|
|
5
|
+
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $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
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Retrieves the contents of the encrypted fields <code>SecretString</code> or <code>SecretBinary</code> for up to 20 secrets. To retrieve a single secret, call <a>GetSecretValue</a>. </p>
|
|
27
|
+
* <p>To choose which secrets to retrieve, you can specify a list of secrets by name or ARN, or you can use filters. If Secrets Manager encounters errors such as <code>AccessDeniedException</code> while attempting to retrieve any of the secrets, you can see the errors in <code>Errors</code> in the response.</p>
|
|
28
|
+
* <p>Secrets Manager generates CloudTrail <code>GetSecretValue</code> log entries for each secret you request 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>
|
|
29
|
+
* <p>
|
|
30
|
+
* <b>Required permissions: </b>
|
|
31
|
+
* <code>secretsmanager:BatchGetSecretValue</code>, and you must have <code>secretsmanager:GetSecretValue</code> for each secret. If you use filters, you must also have <code>secretsmanager:ListSecrets</code>. If the secrets are encrypted using customer-managed keys instead of the Amazon Web Services managed key
|
|
32
|
+
* <code>aws/secretsmanager</code>, then you also need <code>kms:Decrypt</code> permissions for the keys.
|
|
33
|
+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
|
|
34
|
+
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
|
|
35
|
+
* and access control in Secrets Manager</a>. </p>
|
|
36
|
+
* @example
|
|
37
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
38
|
+
* ```javascript
|
|
39
|
+
* import { SecretsManagerClient, BatchGetSecretValueCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
|
|
40
|
+
* // const { SecretsManagerClient, BatchGetSecretValueCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
|
|
41
|
+
* const client = new SecretsManagerClient(config);
|
|
42
|
+
* const input = { // BatchGetSecretValueRequest
|
|
43
|
+
* SecretIdList: [ // SecretIdListType
|
|
44
|
+
* "STRING_VALUE",
|
|
45
|
+
* ],
|
|
46
|
+
* Filters: [ // FiltersListType
|
|
47
|
+
* { // Filter
|
|
48
|
+
* Key: "description" || "name" || "tag-key" || "tag-value" || "primary-region" || "owning-service" || "all",
|
|
49
|
+
* Values: [ // FilterValuesStringList
|
|
50
|
+
* "STRING_VALUE",
|
|
51
|
+
* ],
|
|
52
|
+
* },
|
|
53
|
+
* ],
|
|
54
|
+
* MaxResults: Number("int"),
|
|
55
|
+
* NextToken: "STRING_VALUE",
|
|
56
|
+
* };
|
|
57
|
+
* const command = new BatchGetSecretValueCommand(input);
|
|
58
|
+
* const response = await client.send(command);
|
|
59
|
+
* // { // BatchGetSecretValueResponse
|
|
60
|
+
* // SecretValues: [ // SecretValuesType
|
|
61
|
+
* // { // SecretValueEntry
|
|
62
|
+
* // ARN: "STRING_VALUE",
|
|
63
|
+
* // Name: "STRING_VALUE",
|
|
64
|
+
* // VersionId: "STRING_VALUE",
|
|
65
|
+
* // SecretBinary: "BLOB_VALUE",
|
|
66
|
+
* // SecretString: "STRING_VALUE",
|
|
67
|
+
* // VersionStages: [ // SecretVersionStagesType
|
|
68
|
+
* // "STRING_VALUE",
|
|
69
|
+
* // ],
|
|
70
|
+
* // CreatedDate: new Date("TIMESTAMP"),
|
|
71
|
+
* // },
|
|
72
|
+
* // ],
|
|
73
|
+
* // NextToken: "STRING_VALUE",
|
|
74
|
+
* // Errors: [ // APIErrorListType
|
|
75
|
+
* // { // APIErrorType
|
|
76
|
+
* // SecretId: "STRING_VALUE",
|
|
77
|
+
* // ErrorCode: "STRING_VALUE",
|
|
78
|
+
* // Message: "STRING_VALUE",
|
|
79
|
+
* // },
|
|
80
|
+
* // ],
|
|
81
|
+
* // };
|
|
82
|
+
*
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* @param BatchGetSecretValueCommandInput - {@link BatchGetSecretValueCommandInput}
|
|
86
|
+
* @returns {@link BatchGetSecretValueCommandOutput}
|
|
87
|
+
* @see {@link BatchGetSecretValueCommandInput} for command's `input` shape.
|
|
88
|
+
* @see {@link BatchGetSecretValueCommandOutput} for command's `response` shape.
|
|
89
|
+
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
90
|
+
*
|
|
91
|
+
* @throws {@link DecryptionFailure} (client fault)
|
|
92
|
+
* <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
|
|
93
|
+
*
|
|
94
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
95
|
+
* <p>An error occurred on the server side.</p>
|
|
96
|
+
*
|
|
97
|
+
* @throws {@link InvalidNextTokenException} (client fault)
|
|
98
|
+
* <p>The <code>NextToken</code> value is invalid.</p>
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
101
|
+
* <p>The parameter name or value is invalid.</p>
|
|
102
|
+
*
|
|
103
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
104
|
+
* <p>A parameter value is not valid for the current state of the
|
|
105
|
+
* resource.</p>
|
|
106
|
+
* <p>Possible causes:</p>
|
|
107
|
+
* <ul>
|
|
108
|
+
* <li>
|
|
109
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
110
|
+
* </li>
|
|
111
|
+
* <li>
|
|
112
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
113
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
114
|
+
* </li>
|
|
115
|
+
* <li>
|
|
116
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
117
|
+
* 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>
|
|
118
|
+
* </li>
|
|
119
|
+
* </ul>
|
|
120
|
+
*
|
|
121
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
122
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
123
|
+
*
|
|
124
|
+
* @throws {@link SecretsManagerServiceException}
|
|
125
|
+
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
126
|
+
*
|
|
127
|
+
*/
|
|
128
|
+
export declare class BatchGetSecretValueCommand extends $Command<BatchGetSecretValueCommandInput, BatchGetSecretValueCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
129
|
+
readonly input: BatchGetSecretValueCommandInput;
|
|
130
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
131
|
+
/**
|
|
132
|
+
* @public
|
|
133
|
+
*/
|
|
134
|
+
constructor(input: BatchGetSecretValueCommandInput);
|
|
135
|
+
/**
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SecretsManagerClientResolvedConfig, options?: __HttpHandlerOptions): Handler<BatchGetSecretValueCommandInput, BatchGetSecretValueCommandOutput>;
|
|
139
|
+
/**
|
|
140
|
+
* @internal
|
|
141
|
+
*/
|
|
142
|
+
private serialize;
|
|
143
|
+
/**
|
|
144
|
+
* @internal
|
|
145
|
+
*/
|
|
146
|
+
private deserialize;
|
|
147
|
+
}
|
|
@@ -26,6 +26,7 @@ export interface GetSecretValueCommandOutput extends GetSecretValueResponse, __M
|
|
|
26
26
|
* <p>Retrieves the contents of the encrypted fields <code>SecretString</code> or
|
|
27
27
|
* <code>SecretBinary</code> from the specified version of a secret, whichever contains
|
|
28
28
|
* content.</p>
|
|
29
|
+
* <p>To retrieve the values for a group of secrets, call <a>BatchGetSecretValue</a>.</p>
|
|
29
30
|
* <p>We recommend that you cache your secret values by using client-side caching.
|
|
30
31
|
* Caching secrets improves speed and reduces your costs. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets.html">Cache secrets for
|
|
31
32
|
* your applications</a>.</p>
|
|
@@ -28,8 +28,7 @@ export interface ListSecretsCommandOutput extends ListSecretsResponse, __Metadat
|
|
|
28
28
|
* <p>ListSecrets is eventually consistent, however it might not reflect changes from the last five minutes.
|
|
29
29
|
* To get the latest information for a specific secret, use <a>DescribeSecret</a>.</p>
|
|
30
30
|
* <p>To list the versions of a secret, use <a>ListSecretVersionIds</a>.</p>
|
|
31
|
-
* <p>To
|
|
32
|
-
* call <a>GetSecretValue</a>.</p>
|
|
31
|
+
* <p>To retrieve the values for the secrets, call <a>BatchGetSecretValue</a> or <a>GetSecretValue</a>.</p>
|
|
33
32
|
* <p>For information about finding secrets in the console, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_search-secret.html">Find secrets in Secrets Manager</a>.</p>
|
|
34
33
|
* <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>
|
|
35
34
|
* <p>
|