@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,147 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { PutResourcePolicyRequest, PutResourcePolicyResponse } 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 PutResourcePolicyCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface PutResourcePolicyCommandInput extends PutResourcePolicyRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link PutResourcePolicyCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface PutResourcePolicyCommandOutput extends PutResourcePolicyResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const PutResourcePolicyCommand_base: {
|
|
25
|
+
new (input: PutResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: PutResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Attaches a resource-based permission policy to a secret. A resource-based policy is
|
|
31
|
+
* optional. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication and access control for Secrets Manager</a>
|
|
32
|
+
* </p>
|
|
33
|
+
* <p>For information about attaching a policy in the console, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html">Attach a permissions policy to a secret</a>.</p>
|
|
34
|
+
* <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
|
+
* <p>
|
|
36
|
+
* <b>Required permissions:
|
|
37
|
+
* </b>
|
|
38
|
+
* <code>secretsmanager:PutResourcePolicy</code>. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
|
|
39
|
+
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
|
|
40
|
+
* and access control in Secrets Manager</a>. </p>
|
|
41
|
+
* @example
|
|
42
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
43
|
+
* ```javascript
|
|
44
|
+
* import { SecretsManagerClient, PutResourcePolicyCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
|
|
45
|
+
* // const { SecretsManagerClient, PutResourcePolicyCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
|
|
46
|
+
* // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
|
|
47
|
+
* const config = {}; // type is SecretsManagerClientConfig
|
|
48
|
+
* const client = new SecretsManagerClient(config);
|
|
49
|
+
* const input = { // PutResourcePolicyRequest
|
|
50
|
+
* SecretId: "STRING_VALUE", // required
|
|
51
|
+
* ResourcePolicy: "STRING_VALUE", // required
|
|
52
|
+
* BlockPublicPolicy: true || false,
|
|
53
|
+
* };
|
|
54
|
+
* const command = new PutResourcePolicyCommand(input);
|
|
55
|
+
* const response = await client.send(command);
|
|
56
|
+
* // { // PutResourcePolicyResponse
|
|
57
|
+
* // ARN: "STRING_VALUE",
|
|
58
|
+
* // Name: "STRING_VALUE",
|
|
59
|
+
* // };
|
|
60
|
+
*
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param PutResourcePolicyCommandInput - {@link PutResourcePolicyCommandInput}
|
|
64
|
+
* @returns {@link PutResourcePolicyCommandOutput}
|
|
65
|
+
* @see {@link PutResourcePolicyCommandInput} for command's `input` shape.
|
|
66
|
+
* @see {@link PutResourcePolicyCommandOutput} for command's `response` shape.
|
|
67
|
+
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
70
|
+
* <p>An error occurred on the server side.</p>
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
73
|
+
* <p>The parameter name or value is invalid.</p>
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
76
|
+
* <p>A parameter value is not valid for the current state of the
|
|
77
|
+
* resource.</p>
|
|
78
|
+
* <p>Possible causes:</p>
|
|
79
|
+
* <ul>
|
|
80
|
+
* <li>
|
|
81
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
82
|
+
* </li>
|
|
83
|
+
* <li>
|
|
84
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
85
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
86
|
+
* </li>
|
|
87
|
+
* <li>
|
|
88
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
89
|
+
* 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>
|
|
90
|
+
* </li>
|
|
91
|
+
* </ul>
|
|
92
|
+
*
|
|
93
|
+
* @throws {@link MalformedPolicyDocumentException} (client fault)
|
|
94
|
+
* <p>The resource policy has syntax errors.</p>
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link PublicPolicyException} (client fault)
|
|
97
|
+
* <p>The <code>BlockPublicPolicy</code> parameter is set to true, and the resource policy did not prevent broad access to the secret.</p>
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
100
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link SecretsManagerServiceException}
|
|
103
|
+
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
104
|
+
*
|
|
105
|
+
*
|
|
106
|
+
* @example To add a resource-based policy to a secret
|
|
107
|
+
* ```javascript
|
|
108
|
+
* // The following example shows how to add a resource-based policy to a secret.
|
|
109
|
+
* const input = {
|
|
110
|
+
* ResourcePolicy: `{
|
|
111
|
+
* "Version":"2012-10-17",
|
|
112
|
+
* "Statement":[{
|
|
113
|
+
* "Effect":"Allow",
|
|
114
|
+
* "Principal":{
|
|
115
|
+
* "AWS":"arn:aws:iam::123456789012:root"
|
|
116
|
+
* },
|
|
117
|
+
* "Action":"secretsmanager:GetSecretValue",
|
|
118
|
+
* "Resource":"*"
|
|
119
|
+
* }]
|
|
120
|
+
* }`,
|
|
121
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
122
|
+
* };
|
|
123
|
+
* const command = new PutResourcePolicyCommand(input);
|
|
124
|
+
* const response = await client.send(command);
|
|
125
|
+
* /* response is
|
|
126
|
+
* {
|
|
127
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
128
|
+
* Name: "MyTestDatabaseSecret"
|
|
129
|
+
* }
|
|
130
|
+
* *\/
|
|
131
|
+
* ```
|
|
132
|
+
*
|
|
133
|
+
* @public
|
|
134
|
+
*/
|
|
135
|
+
export declare class PutResourcePolicyCommand extends PutResourcePolicyCommand_base {
|
|
136
|
+
/** @internal type navigation helper, not in runtime. */
|
|
137
|
+
protected static __types: {
|
|
138
|
+
api: {
|
|
139
|
+
input: PutResourcePolicyRequest;
|
|
140
|
+
output: PutResourcePolicyResponse;
|
|
141
|
+
};
|
|
142
|
+
sdk: {
|
|
143
|
+
input: PutResourcePolicyCommandInput;
|
|
144
|
+
output: PutResourcePolicyCommandOutput;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { PutSecretValueRequest, PutSecretValueResponse } 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 PutSecretValueCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface PutSecretValueCommandInput extends PutSecretValueRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link PutSecretValueCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface PutSecretValueCommandOutput extends PutSecretValueResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const PutSecretValueCommand_base: {
|
|
25
|
+
new (input: PutSecretValueCommandInput): import("@smithy/smithy-client").CommandImpl<PutSecretValueCommandInput, PutSecretValueCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: PutSecretValueCommandInput): import("@smithy/smithy-client").CommandImpl<PutSecretValueCommandInput, PutSecretValueCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Creates a new version of your secret by creating a new encrypted value and attaching
|
|
31
|
+
* it to the secret. version can contain a new <code>SecretString</code> value or a new
|
|
32
|
+
* <code>SecretBinary</code> value. </p>
|
|
33
|
+
* <p>Do not call <code>PutSecretValue</code> at a sustained rate of more than once every 10
|
|
34
|
+
* minutes. When you update the secret value, Secrets Manager creates a new version of the secret.
|
|
35
|
+
* Secrets Manager keeps 100 of the most recent versions, but it keeps <i>all</i>
|
|
36
|
+
* secret versions created in the last 24 hours. If you call <code>PutSecretValue</code>
|
|
37
|
+
* more than once every 10 minutes, you will create more versions than Secrets Manager removes, and
|
|
38
|
+
* you will reach the quota for secret versions.</p>
|
|
39
|
+
* <p>You can specify the staging labels to attach to the new version in
|
|
40
|
+
* <code>VersionStages</code>. If you don't include <code>VersionStages</code>, then
|
|
41
|
+
* Secrets Manager automatically moves the staging label <code>AWSCURRENT</code> to this version. If
|
|
42
|
+
* this operation creates the first version for the secret, then Secrets Manager automatically
|
|
43
|
+
* attaches the staging label <code>AWSCURRENT</code> to it. If this operation moves the
|
|
44
|
+
* staging label <code>AWSCURRENT</code> from another version to this version, then Secrets Manager
|
|
45
|
+
* also automatically moves the staging label <code>AWSPREVIOUS</code> to the version that
|
|
46
|
+
* <code>AWSCURRENT</code> was removed from.</p>
|
|
47
|
+
* <p>This operation is idempotent. If you call this operation with a
|
|
48
|
+
* <code>ClientRequestToken</code> that matches an existing version's VersionId, and
|
|
49
|
+
* you specify the same secret data, the operation succeeds but does nothing. However, if
|
|
50
|
+
* the secret data is different, then the operation fails because you can't modify an
|
|
51
|
+
* existing version; you can only create new ones.</p>
|
|
52
|
+
* <p>Secrets Manager generates a CloudTrail log entry when you call this action.
|
|
53
|
+
* Do not include sensitive information in request parameters except
|
|
54
|
+
* <code>SecretBinary</code>, <code>SecretString</code>, or <code>RotationToken</code>
|
|
55
|
+
* 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>
|
|
56
|
+
* <p>
|
|
57
|
+
* <b>Required permissions:
|
|
58
|
+
* </b>
|
|
59
|
+
* <code>secretsmanager:PutSecretValue</code>. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
|
|
60
|
+
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
|
|
61
|
+
* and access control in Secrets Manager</a>. </p>
|
|
62
|
+
* <important>
|
|
63
|
+
* <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>
|
|
64
|
+
* </important>
|
|
65
|
+
* @example
|
|
66
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
67
|
+
* ```javascript
|
|
68
|
+
* import { SecretsManagerClient, PutSecretValueCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
|
|
69
|
+
* // const { SecretsManagerClient, PutSecretValueCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
|
|
70
|
+
* // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
|
|
71
|
+
* const config = {}; // type is SecretsManagerClientConfig
|
|
72
|
+
* const client = new SecretsManagerClient(config);
|
|
73
|
+
* const input = { // PutSecretValueRequest
|
|
74
|
+
* SecretId: "STRING_VALUE", // required
|
|
75
|
+
* ClientRequestToken: "STRING_VALUE",
|
|
76
|
+
* SecretBinary: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
77
|
+
* SecretString: "STRING_VALUE",
|
|
78
|
+
* VersionStages: [ // SecretVersionStagesType
|
|
79
|
+
* "STRING_VALUE",
|
|
80
|
+
* ],
|
|
81
|
+
* RotationToken: "STRING_VALUE",
|
|
82
|
+
* };
|
|
83
|
+
* const command = new PutSecretValueCommand(input);
|
|
84
|
+
* const response = await client.send(command);
|
|
85
|
+
* // { // PutSecretValueResponse
|
|
86
|
+
* // ARN: "STRING_VALUE",
|
|
87
|
+
* // Name: "STRING_VALUE",
|
|
88
|
+
* // VersionId: "STRING_VALUE",
|
|
89
|
+
* // VersionStages: [ // SecretVersionStagesType
|
|
90
|
+
* // "STRING_VALUE",
|
|
91
|
+
* // ],
|
|
92
|
+
* // };
|
|
93
|
+
*
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @param PutSecretValueCommandInput - {@link PutSecretValueCommandInput}
|
|
97
|
+
* @returns {@link PutSecretValueCommandOutput}
|
|
98
|
+
* @see {@link PutSecretValueCommandInput} for command's `input` shape.
|
|
99
|
+
* @see {@link PutSecretValueCommandOutput} for command's `response` shape.
|
|
100
|
+
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link DecryptionFailure} (client fault)
|
|
103
|
+
* <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
|
|
104
|
+
*
|
|
105
|
+
* @throws {@link EncryptionFailure} (client fault)
|
|
106
|
+
* <p>Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the
|
|
107
|
+
* KMS key is available, enabled, and not in an invalid state. For more
|
|
108
|
+
* information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a>.</p>
|
|
109
|
+
*
|
|
110
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
111
|
+
* <p>An error occurred on the server side.</p>
|
|
112
|
+
*
|
|
113
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
114
|
+
* <p>The parameter name or value is invalid.</p>
|
|
115
|
+
*
|
|
116
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
117
|
+
* <p>A parameter value is not valid for the current state of the
|
|
118
|
+
* resource.</p>
|
|
119
|
+
* <p>Possible causes:</p>
|
|
120
|
+
* <ul>
|
|
121
|
+
* <li>
|
|
122
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
123
|
+
* </li>
|
|
124
|
+
* <li>
|
|
125
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
126
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
127
|
+
* </li>
|
|
128
|
+
* <li>
|
|
129
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
130
|
+
* 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>
|
|
131
|
+
* </li>
|
|
132
|
+
* </ul>
|
|
133
|
+
*
|
|
134
|
+
* @throws {@link LimitExceededException} (client fault)
|
|
135
|
+
* <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
|
|
136
|
+
*
|
|
137
|
+
* @throws {@link ResourceExistsException} (client fault)
|
|
138
|
+
* <p>A resource with the ID you requested already exists.</p>
|
|
139
|
+
*
|
|
140
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
141
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
142
|
+
*
|
|
143
|
+
* @throws {@link SecretsManagerServiceException}
|
|
144
|
+
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
145
|
+
*
|
|
146
|
+
*
|
|
147
|
+
* @example To store a secret value in a new version of a secret
|
|
148
|
+
* ```javascript
|
|
149
|
+
* // The following example shows how to create a new version of the secret. Alternatively, you can use the update-secret command.
|
|
150
|
+
* const input = {
|
|
151
|
+
* ClientRequestToken: "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
|
|
152
|
+
* SecretId: "MyTestDatabaseSecret",
|
|
153
|
+
* SecretString: `{"username":"david","password":"EXAMPLE-PASSWORD"}`
|
|
154
|
+
* };
|
|
155
|
+
* const command = new PutSecretValueCommand(input);
|
|
156
|
+
* const response = await client.send(command);
|
|
157
|
+
* /* response is
|
|
158
|
+
* {
|
|
159
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
160
|
+
* Name: "MyTestDatabaseSecret",
|
|
161
|
+
* VersionId: "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
|
|
162
|
+
* VersionStages: [
|
|
163
|
+
* "AWSCURRENT"
|
|
164
|
+
* ]
|
|
165
|
+
* }
|
|
166
|
+
* *\/
|
|
167
|
+
* ```
|
|
168
|
+
*
|
|
169
|
+
* @public
|
|
170
|
+
*/
|
|
171
|
+
export declare class PutSecretValueCommand extends PutSecretValueCommand_base {
|
|
172
|
+
/** @internal type navigation helper, not in runtime. */
|
|
173
|
+
protected static __types: {
|
|
174
|
+
api: {
|
|
175
|
+
input: PutSecretValueRequest;
|
|
176
|
+
output: PutSecretValueResponse;
|
|
177
|
+
};
|
|
178
|
+
sdk: {
|
|
179
|
+
input: PutSecretValueCommandInput;
|
|
180
|
+
output: PutSecretValueCommandOutput;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { RemoveRegionsFromReplicationRequest, RemoveRegionsFromReplicationResponse } 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 RemoveRegionsFromReplicationCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface RemoveRegionsFromReplicationCommandInput extends RemoveRegionsFromReplicationRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link RemoveRegionsFromReplicationCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface RemoveRegionsFromReplicationCommandOutput extends RemoveRegionsFromReplicationResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const RemoveRegionsFromReplicationCommand_base: {
|
|
25
|
+
new (input: RemoveRegionsFromReplicationCommandInput): import("@smithy/smithy-client").CommandImpl<RemoveRegionsFromReplicationCommandInput, RemoveRegionsFromReplicationCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: RemoveRegionsFromReplicationCommandInput): import("@smithy/smithy-client").CommandImpl<RemoveRegionsFromReplicationCommandInput, RemoveRegionsFromReplicationCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>For a secret that is replicated to other Regions, deletes the secret replicas from the
|
|
31
|
+
* Regions you specify.</p>
|
|
32
|
+
* <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>
|
|
33
|
+
* <p>
|
|
34
|
+
* <b>Required permissions:
|
|
35
|
+
* </b>
|
|
36
|
+
* <code>secretsmanager:RemoveRegionsFromReplication</code>.
|
|
37
|
+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
|
|
38
|
+
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
|
|
39
|
+
* and access control in Secrets Manager</a>. </p>
|
|
40
|
+
* @example
|
|
41
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
42
|
+
* ```javascript
|
|
43
|
+
* import { SecretsManagerClient, RemoveRegionsFromReplicationCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
|
|
44
|
+
* // const { SecretsManagerClient, RemoveRegionsFromReplicationCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
|
|
45
|
+
* // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
|
|
46
|
+
* const config = {}; // type is SecretsManagerClientConfig
|
|
47
|
+
* const client = new SecretsManagerClient(config);
|
|
48
|
+
* const input = { // RemoveRegionsFromReplicationRequest
|
|
49
|
+
* SecretId: "STRING_VALUE", // required
|
|
50
|
+
* RemoveReplicaRegions: [ // RemoveReplicaRegionListType // required
|
|
51
|
+
* "STRING_VALUE",
|
|
52
|
+
* ],
|
|
53
|
+
* };
|
|
54
|
+
* const command = new RemoveRegionsFromReplicationCommand(input);
|
|
55
|
+
* const response = await client.send(command);
|
|
56
|
+
* // { // RemoveRegionsFromReplicationResponse
|
|
57
|
+
* // ARN: "STRING_VALUE",
|
|
58
|
+
* // ReplicationStatus: [ // ReplicationStatusListType
|
|
59
|
+
* // { // ReplicationStatusType
|
|
60
|
+
* // Region: "STRING_VALUE",
|
|
61
|
+
* // KmsKeyId: "STRING_VALUE",
|
|
62
|
+
* // Status: "InSync" || "Failed" || "InProgress",
|
|
63
|
+
* // StatusMessage: "STRING_VALUE",
|
|
64
|
+
* // LastAccessedDate: new Date("TIMESTAMP"),
|
|
65
|
+
* // },
|
|
66
|
+
* // ],
|
|
67
|
+
* // };
|
|
68
|
+
*
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @param RemoveRegionsFromReplicationCommandInput - {@link RemoveRegionsFromReplicationCommandInput}
|
|
72
|
+
* @returns {@link RemoveRegionsFromReplicationCommandOutput}
|
|
73
|
+
* @see {@link RemoveRegionsFromReplicationCommandInput} for command's `input` shape.
|
|
74
|
+
* @see {@link RemoveRegionsFromReplicationCommandOutput} for command's `response` shape.
|
|
75
|
+
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
78
|
+
* <p>An error occurred on the server side.</p>
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
81
|
+
* <p>The parameter name or value is invalid.</p>
|
|
82
|
+
*
|
|
83
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
84
|
+
* <p>A parameter value is not valid for the current state of the
|
|
85
|
+
* resource.</p>
|
|
86
|
+
* <p>Possible causes:</p>
|
|
87
|
+
* <ul>
|
|
88
|
+
* <li>
|
|
89
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
90
|
+
* </li>
|
|
91
|
+
* <li>
|
|
92
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
93
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
94
|
+
* </li>
|
|
95
|
+
* <li>
|
|
96
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
97
|
+
* 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>
|
|
98
|
+
* </li>
|
|
99
|
+
* </ul>
|
|
100
|
+
*
|
|
101
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
102
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
103
|
+
*
|
|
104
|
+
* @throws {@link SecretsManagerServiceException}
|
|
105
|
+
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
106
|
+
*
|
|
107
|
+
*
|
|
108
|
+
* @public
|
|
109
|
+
*/
|
|
110
|
+
export declare class RemoveRegionsFromReplicationCommand extends RemoveRegionsFromReplicationCommand_base {
|
|
111
|
+
/** @internal type navigation helper, not in runtime. */
|
|
112
|
+
protected static __types: {
|
|
113
|
+
api: {
|
|
114
|
+
input: RemoveRegionsFromReplicationRequest;
|
|
115
|
+
output: RemoveRegionsFromReplicationResponse;
|
|
116
|
+
};
|
|
117
|
+
sdk: {
|
|
118
|
+
input: RemoveRegionsFromReplicationCommandInput;
|
|
119
|
+
output: RemoveRegionsFromReplicationCommandOutput;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { ReplicateSecretToRegionsRequest, ReplicateSecretToRegionsResponse } 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 ReplicateSecretToRegionsCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface ReplicateSecretToRegionsCommandInput extends ReplicateSecretToRegionsRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link ReplicateSecretToRegionsCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface ReplicateSecretToRegionsCommandOutput extends ReplicateSecretToRegionsResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const ReplicateSecretToRegionsCommand_base: {
|
|
25
|
+
new (input: ReplicateSecretToRegionsCommandInput): import("@smithy/smithy-client").CommandImpl<ReplicateSecretToRegionsCommandInput, ReplicateSecretToRegionsCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: ReplicateSecretToRegionsCommandInput): import("@smithy/smithy-client").CommandImpl<ReplicateSecretToRegionsCommandInput, ReplicateSecretToRegionsCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Replicates the secret to a new Regions. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/create-manage-multi-region-secrets.html">Multi-Region secrets</a>.</p>
|
|
31
|
+
* <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>
|
|
32
|
+
* <p>
|
|
33
|
+
* <b>Required permissions:
|
|
34
|
+
* </b>
|
|
35
|
+
* <code>secretsmanager:ReplicateSecretToRegions</code>. If the primary
|
|
36
|
+
* secret is encrypted with a KMS key other than <code>aws/secretsmanager</code>, you also
|
|
37
|
+
* need <code>kms:Decrypt</code> permission to the key. To encrypt the replicated secret
|
|
38
|
+
* with a KMS key other than <code>aws/secretsmanager</code>, you need
|
|
39
|
+
* <code>kms:GenerateDataKey</code> and <code>kms:Encrypt</code> to the key.
|
|
40
|
+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
|
|
41
|
+
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
|
|
42
|
+
* and access control in Secrets Manager</a>. </p>
|
|
43
|
+
* @example
|
|
44
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
45
|
+
* ```javascript
|
|
46
|
+
* import { SecretsManagerClient, ReplicateSecretToRegionsCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
|
|
47
|
+
* // const { SecretsManagerClient, ReplicateSecretToRegionsCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
|
|
48
|
+
* // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
|
|
49
|
+
* const config = {}; // type is SecretsManagerClientConfig
|
|
50
|
+
* const client = new SecretsManagerClient(config);
|
|
51
|
+
* const input = { // ReplicateSecretToRegionsRequest
|
|
52
|
+
* SecretId: "STRING_VALUE", // required
|
|
53
|
+
* AddReplicaRegions: [ // AddReplicaRegionListType // required
|
|
54
|
+
* { // ReplicaRegionType
|
|
55
|
+
* Region: "STRING_VALUE",
|
|
56
|
+
* KmsKeyId: "STRING_VALUE",
|
|
57
|
+
* },
|
|
58
|
+
* ],
|
|
59
|
+
* ForceOverwriteReplicaSecret: true || false,
|
|
60
|
+
* };
|
|
61
|
+
* const command = new ReplicateSecretToRegionsCommand(input);
|
|
62
|
+
* const response = await client.send(command);
|
|
63
|
+
* // { // ReplicateSecretToRegionsResponse
|
|
64
|
+
* // ARN: "STRING_VALUE",
|
|
65
|
+
* // ReplicationStatus: [ // ReplicationStatusListType
|
|
66
|
+
* // { // ReplicationStatusType
|
|
67
|
+
* // Region: "STRING_VALUE",
|
|
68
|
+
* // KmsKeyId: "STRING_VALUE",
|
|
69
|
+
* // Status: "InSync" || "Failed" || "InProgress",
|
|
70
|
+
* // StatusMessage: "STRING_VALUE",
|
|
71
|
+
* // LastAccessedDate: new Date("TIMESTAMP"),
|
|
72
|
+
* // },
|
|
73
|
+
* // ],
|
|
74
|
+
* // };
|
|
75
|
+
*
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @param ReplicateSecretToRegionsCommandInput - {@link ReplicateSecretToRegionsCommandInput}
|
|
79
|
+
* @returns {@link ReplicateSecretToRegionsCommandOutput}
|
|
80
|
+
* @see {@link ReplicateSecretToRegionsCommandInput} for command's `input` shape.
|
|
81
|
+
* @see {@link ReplicateSecretToRegionsCommandOutput} for command's `response` shape.
|
|
82
|
+
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
85
|
+
* <p>An error occurred on the server side.</p>
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
88
|
+
* <p>The parameter name or value is invalid.</p>
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
91
|
+
* <p>A parameter value is not valid for the current state of the
|
|
92
|
+
* resource.</p>
|
|
93
|
+
* <p>Possible causes:</p>
|
|
94
|
+
* <ul>
|
|
95
|
+
* <li>
|
|
96
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
97
|
+
* </li>
|
|
98
|
+
* <li>
|
|
99
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
100
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
101
|
+
* </li>
|
|
102
|
+
* <li>
|
|
103
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
104
|
+
* 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>
|
|
105
|
+
* </li>
|
|
106
|
+
* </ul>
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
109
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
110
|
+
*
|
|
111
|
+
* @throws {@link SecretsManagerServiceException}
|
|
112
|
+
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
113
|
+
*
|
|
114
|
+
*
|
|
115
|
+
* @example Example
|
|
116
|
+
* ```javascript
|
|
117
|
+
* // The following example replicates a secret to eu-west-3. The replica is encrypted with the AWS managed key aws/secretsmanager.
|
|
118
|
+
* const input = {
|
|
119
|
+
* AddReplicaRegions: [
|
|
120
|
+
* {
|
|
121
|
+
* Region: "eu-west-3"
|
|
122
|
+
* }
|
|
123
|
+
* ],
|
|
124
|
+
* ForceOverwriteReplicaSecret: true,
|
|
125
|
+
* SecretId: "MyTestSecret"
|
|
126
|
+
* };
|
|
127
|
+
* const command = new ReplicateSecretToRegionsCommand(input);
|
|
128
|
+
* const response = await client.send(command);
|
|
129
|
+
* /* response is
|
|
130
|
+
* {
|
|
131
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestSecret-1a2b3c",
|
|
132
|
+
* ReplicationStatus: [
|
|
133
|
+
* {
|
|
134
|
+
* KmsKeyId: "alias/aws/secretsmanager",
|
|
135
|
+
* Region: "eu-west-3",
|
|
136
|
+
* Status: "InProgress"
|
|
137
|
+
* }
|
|
138
|
+
* ]
|
|
139
|
+
* }
|
|
140
|
+
* *\/
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* @public
|
|
144
|
+
*/
|
|
145
|
+
export declare class ReplicateSecretToRegionsCommand extends ReplicateSecretToRegionsCommand_base {
|
|
146
|
+
/** @internal type navigation helper, not in runtime. */
|
|
147
|
+
protected static __types: {
|
|
148
|
+
api: {
|
|
149
|
+
input: ReplicateSecretToRegionsRequest;
|
|
150
|
+
output: ReplicateSecretToRegionsResponse;
|
|
151
|
+
};
|
|
152
|
+
sdk: {
|
|
153
|
+
input: ReplicateSecretToRegionsCommandInput;
|
|
154
|
+
output: ReplicateSecretToRegionsCommandOutput;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
}
|