@aws-sdk/client-secrets-manager 3.1167.0 → 3.1169.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.
Files changed (48) hide show
  1. package/README.md +21 -0
  2. package/dist-cjs/index.js +187 -65
  3. package/dist-es/SecretsManager.js +8 -0
  4. package/dist-es/commands/AssociateCrossAccountReplicaCommand.js +4 -0
  5. package/dist-es/commands/DisassociateCrossAccountReplicaCommand.js +4 -0
  6. package/dist-es/commands/ListResourcePoliciesCommand.js +4 -0
  7. package/dist-es/commands/index.js +3 -0
  8. package/dist-es/models/enums.js +11 -5
  9. package/dist-es/models/errors.js +40 -40
  10. package/dist-es/pagination/ListResourcePoliciesPaginator.js +4 -0
  11. package/dist-es/pagination/index.js +1 -0
  12. package/dist-es/schemas/schemas_0.js +103 -19
  13. package/dist-types/SecretsManager.d.ts +28 -0
  14. package/dist-types/SecretsManagerClient.d.ts +5 -2
  15. package/dist-types/commands/AssociateCrossAccountReplicaCommand.d.ts +148 -0
  16. package/dist-types/commands/CancelRotateSecretCommand.d.ts +1 -1
  17. package/dist-types/commands/CreateSecretCommand.d.ts +33 -9
  18. package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +4 -1
  19. package/dist-types/commands/DeleteSecretCommand.d.ts +6 -0
  20. package/dist-types/commands/DescribeSecretCommand.d.ts +21 -1
  21. package/dist-types/commands/DisassociateCrossAccountReplicaCommand.d.ts +135 -0
  22. package/dist-types/commands/GetResourcePolicyCommand.d.ts +3 -0
  23. package/dist-types/commands/ListResourcePoliciesCommand.d.ts +138 -0
  24. package/dist-types/commands/ListSecretVersionIdsCommand.d.ts +7 -0
  25. package/dist-types/commands/PutResourcePolicyCommand.d.ts +4 -1
  26. package/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts +1 -1
  27. package/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts +1 -1
  28. package/dist-types/commands/StopReplicationToReplicaCommand.d.ts +36 -5
  29. package/dist-types/commands/index.d.ts +3 -0
  30. package/dist-types/models/enums.d.ts +23 -9
  31. package/dist-types/models/errors.d.ts +38 -38
  32. package/dist-types/models/models_0.d.ts +351 -5
  33. package/dist-types/pagination/ListResourcePoliciesPaginator.d.ts +7 -0
  34. package/dist-types/pagination/index.d.ts +1 -0
  35. package/dist-types/schemas/schemas_0.d.ts +12 -0
  36. package/dist-types/ts3.4/SecretsManager.d.ts +58 -0
  37. package/dist-types/ts3.4/SecretsManagerClient.d.ts +18 -0
  38. package/dist-types/ts3.4/commands/AssociateCrossAccountReplicaCommand.d.ts +42 -0
  39. package/dist-types/ts3.4/commands/DisassociateCrossAccountReplicaCommand.d.ts +42 -0
  40. package/dist-types/ts3.4/commands/ListResourcePoliciesCommand.d.ts +39 -0
  41. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  42. package/dist-types/ts3.4/models/enums.d.ts +14 -6
  43. package/dist-types/ts3.4/models/errors.d.ts +20 -20
  44. package/dist-types/ts3.4/models/models_0.d.ts +58 -1
  45. package/dist-types/ts3.4/pagination/ListResourcePoliciesPaginator.d.ts +11 -0
  46. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  47. package/dist-types/ts3.4/schemas/schemas_0.d.ts +12 -0
  48. package/package.json +1 -1
@@ -0,0 +1,148 @@
1
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
+ import type { AssociateCrossAccountReplicaRequest, AssociateCrossAccountReplicaResponse } from "../models/models_0";
3
+ /**
4
+ * @public
5
+ */
6
+ export type { __MetadataBearer };
7
+ /**
8
+ * @public
9
+ *
10
+ * The input for {@link AssociateCrossAccountReplicaCommand}.
11
+ */
12
+ export interface AssociateCrossAccountReplicaCommandInput extends AssociateCrossAccountReplicaRequest {
13
+ }
14
+ /**
15
+ * @public
16
+ *
17
+ * The output of {@link AssociateCrossAccountReplicaCommand}.
18
+ */
19
+ export interface AssociateCrossAccountReplicaCommandOutput extends AssociateCrossAccountReplicaResponse, __MetadataBearer {
20
+ }
21
+ declare const AssociateCrossAccountReplicaCommand_base: {
22
+ new (input: AssociateCrossAccountReplicaCommandInput): import("@smithy/core/client").CommandImpl<AssociateCrossAccountReplicaCommandInput, AssociateCrossAccountReplicaCommandOutput, import("..").SecretsManagerClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: AssociateCrossAccountReplicaCommandInput): import("@smithy/core/client").CommandImpl<AssociateCrossAccountReplicaCommandInput, AssociateCrossAccountReplicaCommandOutput, import("..").SecretsManagerClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
+ };
26
+ /**
27
+ * <p>Links a primary secret in your account to a replica secret in a different Amazon Web Services
28
+ * account and starts replication to this replica. The replica secret must already exist in the
29
+ * other Amazon Web Services account. Create the replica with <a>CreateSecret</a> and set its
30
+ * <code>CrossAccountPrimaryARN</code> field set to this primary secret's ARN.
31
+ * When you call AssociateCrossAccountReplica, Secrets Manager calls
32
+ * AcceptCrossAccountReplication on the replica secret on your behalf.</p>
33
+ * <p>The primary and replica secrets must be in the same Amazon Web Services Region and partition, and
34
+ * you must call this operation from the account that owns the primary secret. A primary
35
+ * secret can have at most one cross-account replica. This operation is idempotent, so
36
+ * you can call it again for the same replica to repair replication. If the association fails,
37
+ * Secrets Manager does not modify either the primary or replica secret.</p>
38
+ * <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>
39
+ * <p>
40
+ * <b>Required permissions:
41
+ * </b>
42
+ * <code>secretsmanager:AssociateCrossAccountReplica</code>,
43
+ * <code>secretsmanager:GetSecretValue</code> on the primary secret, and
44
+ * <code>secretsmanager:AcceptCrossAccountReplication</code> on the replica secret. You
45
+ * must also have <code>kms:Decrypt</code> permission for the Key Management Service
46
+ * (KMS) key that encrypts the primary secret, and
47
+ * <code>kms:Encrypt</code> permission for the Amazon Web Services KMS key that encrypts the replica
48
+ * secret. If you supply <code>ReplicationRoleARN</code>, you also need
49
+ * <code>iam:PassRole</code> for that role. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
50
+ * IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
51
+ * and access control in Secrets Manager</a>.</p>
52
+ * @example
53
+ * Use a bare-bones client and the command you need to make an API call.
54
+ * ```javascript
55
+ * import { SecretsManagerClient, AssociateCrossAccountReplicaCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
56
+ * // const { SecretsManagerClient, AssociateCrossAccountReplicaCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
57
+ * // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
58
+ * const config = {}; // type is SecretsManagerClientConfig
59
+ * const client = new SecretsManagerClient(config);
60
+ * const input = { // AssociateCrossAccountReplicaRequest
61
+ * SecretId: "STRING_VALUE", // required
62
+ * CrossAccountReplicaARN: "STRING_VALUE", // required
63
+ * ReplicaRestriction: "SameOrg" || "NoRestriction",
64
+ * ReplicationRoleARN: "STRING_VALUE",
65
+ * };
66
+ * const command = new AssociateCrossAccountReplicaCommand(input);
67
+ * const response = await client.send(command);
68
+ * // { // AssociateCrossAccountReplicaResponse
69
+ * // ARN: "STRING_VALUE",
70
+ * // CrossAccountReplicaARN: "STRING_VALUE",
71
+ * // ReplicationStatus: "InSync" || "Failed" || "InProgress" || "Pending" || "Detached",
72
+ * // };
73
+ *
74
+ * ```
75
+ *
76
+ * @param AssociateCrossAccountReplicaCommandInput - {@link AssociateCrossAccountReplicaCommandInput}
77
+ * @returns {@link AssociateCrossAccountReplicaCommandOutput}
78
+ * @see {@link AssociateCrossAccountReplicaCommandInput} for command's `input` shape.
79
+ * @see {@link AssociateCrossAccountReplicaCommandOutput} for command's `response` shape.
80
+ * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
81
+ *
82
+ * @throws {@link InternalServiceError} (server fault)
83
+ * <p>An error occurred on the server side.</p>
84
+ *
85
+ * @throws {@link InvalidParameterException} (client fault)
86
+ * <p>The parameter name or value is invalid.</p>
87
+ *
88
+ * @throws {@link InvalidRequestException} (client fault)
89
+ * <p>A parameter value is not valid for the current state of the
90
+ * resource.</p>
91
+ * <p>Possible causes:</p>
92
+ * <ul>
93
+ * <li>
94
+ * <p>The secret is scheduled for deletion.</p>
95
+ * </li>
96
+ * <li>
97
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
98
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
99
+ * </li>
100
+ * <li>
101
+ * <p>The secret is managed by another service, and you must use that service to update it.
102
+ * 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>
103
+ * </li>
104
+ * </ul>
105
+ *
106
+ * @throws {@link LimitExceededException} (client fault)
107
+ * <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
108
+ *
109
+ * @throws {@link ResourceNotFoundException} (client fault)
110
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
111
+ *
112
+ * @throws {@link SecretsManagerServiceException}
113
+ * <p>Base exception class for all service exceptions from SecretsManager service.</p>
114
+ *
115
+ *
116
+ * @example To replicate a secret to another account
117
+ * ```javascript
118
+ * // The following example links a primary secret to a replica secret in another AWS account and starts replication. The replica secret was previously created in the other account using CreateSecret with the CrossAccountPrimaryARN set to this primary secret.
119
+ * const input = {
120
+ * CrossAccountReplicaARN: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
121
+ * SecretId: "MyTestDatabaseSecret"
122
+ * };
123
+ * const command = new AssociateCrossAccountReplicaCommand(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
+ * CrossAccountReplicaARN: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
129
+ * ReplicationStatus: "InProgress"
130
+ * }
131
+ * *\/
132
+ * ```
133
+ *
134
+ * @public
135
+ */
136
+ export declare class AssociateCrossAccountReplicaCommand extends AssociateCrossAccountReplicaCommand_base {
137
+ /** @internal type navigation helper, not in runtime. */
138
+ protected static __types: {
139
+ api: {
140
+ input: AssociateCrossAccountReplicaRequest;
141
+ output: AssociateCrossAccountReplicaResponse;
142
+ };
143
+ sdk: {
144
+ input: AssociateCrossAccountReplicaCommandInput;
145
+ output: AssociateCrossAccountReplicaCommandOutput;
146
+ };
147
+ };
148
+ }
@@ -31,7 +31,7 @@ declare const CancelRotateSecretCommand_base: {
31
31
  * <code>AWSPENDING</code> from the partially created version. You also need to
32
32
  * determine whether to roll back to the previous version of the secret by moving the
33
33
  * staging label <code>AWSCURRENT</code> to the version that has <code>AWSPENDING</code>.
34
- * 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
34
+ * To determine which version has a specific staging label, call <a>DescribeSecret</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
35
35
  * works</a>.</p>
36
36
  * <p>To turn on automatic rotation again, call <a>RotateSecret</a>.</p>
37
37
  * <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>
@@ -27,9 +27,9 @@ declare const CreateSecretCommand_base: {
27
27
  * <p>Creates a new secret. A <i>secret</i> can be a password, a set of
28
28
  * credentials such as a user name and password, an OAuth token, or other secret
29
29
  * information that you store in an encrypted form in Secrets Manager. The secret also includes the
30
- * connection information to access a database or other service, which Secrets Manager doesn't
31
- * encrypt. A secret in Secrets Manager consists of both the protected secret data and the important
32
- * information needed to manage the secret.</p>
30
+ * connection information to access a database or other service. Secrets Manager does not encrypt
31
+ * this connection information. A secret in Secrets Manager consists of both the encrypted secret
32
+ * versions and the metadata that Secrets Manager uses to manage the secret.</p>
33
33
  * <p>For secrets that use <i>managed rotation</i>, you need to create the
34
34
  * 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
35
35
  * managed by other Amazon Web Services services</a>. </p>
@@ -37,7 +37,7 @@ declare const CreateSecretCommand_base: {
37
37
  * secret</a>.</p>
38
38
  * <p>To create a secret, you can provide the secret value to be encrypted in either the
39
39
  * <code>SecretString</code> parameter or the <code>SecretBinary</code> parameter, but
40
- * not both. If you include <code>SecretString</code> or <code>SecretBinary</code> then
40
+ * not both. If you include <code>SecretString</code> or <code>SecretBinary</code>, then
41
41
  * Secrets Manager creates an initial secret version and automatically attaches the staging label
42
42
  * <code>AWSCURRENT</code> to it.</p>
43
43
  * <p>For database credentials you want to rotate, for Secrets Manager to be able to rotate the
@@ -48,11 +48,15 @@ declare const CreateSecretCommand_base: {
48
48
  * <code>aws/secretsmanager</code>. If this key doesn't already exist in your account,
49
49
  * then Secrets Manager creates it for you automatically. All users and roles in the Amazon Web Services account
50
50
  * automatically have access to use <code>aws/secretsmanager</code>. Creating
51
- * <code>aws/secretsmanager</code> can result in a one-time significant delay in
52
- * returning the result.</p>
51
+ * <code>aws/secretsmanager</code> can result in a one-time delay to complete the
52
+ * secret creation.</p>
53
53
  * <p>If the secret is in a different Amazon Web Services account from the credentials calling the API,
54
54
  * then you can't use <code>aws/secretsmanager</code> to encrypt the secret, and you must
55
55
  * create and use a customer managed KMS key. </p>
56
+ * <p>To create a cross-account replica secret, include <code>CrossAccountPrimaryARN</code>.
57
+ * The replica must use a customer managed KMS key, and can't include
58
+ * <code>AddReplicaRegions</code>, <code>Description</code>, <code>SecretBinary</code>,
59
+ * <code>SecretString</code>, or <code>Type</code>.</p>
56
60
  * <p>Secrets Manager generates a CloudTrail log entry when you call this action.
57
61
  * Do not include sensitive information in request parameters except
58
62
  * <code>SecretBinary</code> or <code>SecretString</code> because it might be logged.
@@ -62,8 +66,9 @@ declare const CreateSecretCommand_base: {
62
66
  * </b>
63
67
  * <code>secretsmanager:CreateSecret</code>. If you include tags in the
64
68
  * secret, you also need <code>secretsmanager:TagResource</code>. To add replica Regions,
65
- * you must also have <code>secretsmanager:ReplicateSecretToRegions</code>.
66
- * For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
69
+ * you must also have <code>secretsmanager:ReplicateSecretToRegions</code>. To create a
70
+ * cross-account replica secret, you must also have
71
+ * <code>secretsmanager:PutResourcePolicy</code> permissions. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
67
72
  * IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
68
73
  * and access control in Secrets Manager</a>. </p>
69
74
  * <p>To encrypt the secret with a KMS key other than <code>aws/secretsmanager</code>, you
@@ -101,6 +106,7 @@ declare const CreateSecretCommand_base: {
101
106
  * ],
102
107
  * ForceOverwriteReplicaSecret: true || false,
103
108
  * Type: "STRING_VALUE",
109
+ * CrossAccountPrimaryARN: "STRING_VALUE",
104
110
  * };
105
111
  * const command = new CreateSecretCommand(input);
106
112
  * const response = await client.send(command);
@@ -112,7 +118,7 @@ declare const CreateSecretCommand_base: {
112
118
  * // { // ReplicationStatusType
113
119
  * // Region: "STRING_VALUE",
114
120
  * // KmsKeyId: "STRING_VALUE",
115
- * // Status: "InSync" || "Failed" || "InProgress",
121
+ * // Status: "InSync" || "Failed" || "InProgress" || "Pending" || "Detached",
116
122
  * // StatusMessage: "STRING_VALUE",
117
123
  * // LastAccessedDate: new Date("TIMESTAMP"),
118
124
  * // },
@@ -198,6 +204,24 @@ declare const CreateSecretCommand_base: {
198
204
  * *\/
199
205
  * ```
200
206
  *
207
+ * @example To create a cross-account replica secret
208
+ * ```javascript
209
+ * // The following example creates a secret that receives replicated data from a primary secret in another AWS account, by setting the CrossAccountPrimaryARN parameter. After creating the replica, link it to the primary secret from the primary account with AssociateCrossAccountReplica.
210
+ * const input = {
211
+ * CrossAccountPrimaryARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
212
+ * KmsKeyId: "arn:aws:kms:us-west-2:222222222222:key/EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE",
213
+ * Name: "MyReplicaSecret"
214
+ * };
215
+ * const command = new CreateSecretCommand(input);
216
+ * const response = await client.send(command);
217
+ * /* response is
218
+ * {
219
+ * ARN: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
220
+ * Name: "MyReplicaSecret"
221
+ * }
222
+ * *\/
223
+ * ```
224
+ *
201
225
  * @public
202
226
  */
203
227
  export declare class CreateSecretCommand extends CreateSecretCommand_base {
@@ -43,12 +43,14 @@ declare const DeleteResourcePolicyCommand_base: {
43
43
  * const client = new SecretsManagerClient(config);
44
44
  * const input = { // DeleteResourcePolicyRequest
45
45
  * SecretId: "STRING_VALUE", // required
46
+ * PolicyName: "STRING_VALUE",
46
47
  * };
47
48
  * const command = new DeleteResourcePolicyCommand(input);
48
49
  * const response = await client.send(command);
49
50
  * // { // DeleteResourcePolicyResponse
50
51
  * // ARN: "STRING_VALUE",
51
52
  * // Name: "STRING_VALUE",
53
+ * // PolicyName: "STRING_VALUE",
52
54
  * // };
53
55
  *
54
56
  * ```
@@ -101,7 +103,8 @@ declare const DeleteResourcePolicyCommand_base: {
101
103
  * /* response is
102
104
  * {
103
105
  * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
104
- * Name: "MyTestDatabaseSecret"
106
+ * Name: "MyTestDatabaseSecret",
107
+ * PolicyName: "default"
105
108
  * }
106
109
  * *\/
107
110
  * ```
@@ -32,6 +32,12 @@ declare const DeleteSecretCommand_base: {
32
32
  * <p>You can't delete a primary secret that is replicated to other Regions. You must first
33
33
  * delete the replicas using <a>RemoveRegionsFromReplication</a>, and then
34
34
  * delete the primary secret. When you delete a replica, it is deleted immediately.</p>
35
+ * <p>You can't delete a cross-account primary secret that is associated with a
36
+ * cross-account replica secret. You must first disassociate each of the replicas using
37
+ * <a>DisassociateCrossAccountReplica</a>, before deleting the primary secret.
38
+ * Similarly, you can't delete a cross-account replica secret without first stopping
39
+ * replication. Call <a>StopReplicationToReplica</a> to stop replication, and
40
+ * then you can delete the secret.</p>
35
41
  * <p>You can't directly delete a version of a secret. Instead, you remove all staging
36
42
  * labels from the version using <a>UpdateSecretVersionStage</a>. This marks the
37
43
  * version as deprecated, and then Secrets Manager can automatically delete the version in the
@@ -26,6 +26,13 @@ declare const DescribeSecretCommand_base: {
26
26
  /**
27
27
  * <p>Retrieves the details of a secret. It does not include the encrypted secret value.
28
28
  * Secrets Manager only returns fields that have a value in the response. </p>
29
+ * <note>
30
+ * <p>The <code>VersionIdsToStages</code> field in the response includes every version ID
31
+ * that has a staging label attached, even if that version doesn't contain a secret
32
+ * value. In contrast, <code>ListSecretVersionIds</code> only returns versions that
33
+ * contain a secret value. To check whether a secret version contains a value, call
34
+ * <a>GetSecretValue</a>.</p>
35
+ * </note>
29
36
  * <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>
30
37
  * <p>
31
38
  * <b>Required permissions:
@@ -89,11 +96,24 @@ declare const DescribeSecretCommand_base: {
89
96
  * // { // ReplicationStatusType
90
97
  * // Region: "STRING_VALUE",
91
98
  * // KmsKeyId: "STRING_VALUE",
92
- * // Status: "InSync" || "Failed" || "InProgress",
99
+ * // Status: "InSync" || "Failed" || "InProgress" || "Pending" || "Detached",
93
100
  * // StatusMessage: "STRING_VALUE",
94
101
  * // LastAccessedDate: new Date("TIMESTAMP"),
95
102
  * // },
96
103
  * // ],
104
+ * // CrossAccountPrimary: { // CrossAccountPrimaryType
105
+ * // PrimarySecretARN: "STRING_VALUE",
106
+ * // ReplicationStatus: "InSync" || "Failed" || "InProgress" || "Pending" || "Detached",
107
+ * // StatusMessage: "STRING_VALUE",
108
+ * // },
109
+ * // CrossAccountReplicas: [ // CrossAccountReplicaListType
110
+ * // { // CrossAccountReplicaEntry
111
+ * // ReplicaSecretARN: "STRING_VALUE",
112
+ * // ReplicationRoleARN: "STRING_VALUE",
113
+ * // ReplicationStatus: "InSync" || "Failed" || "InProgress" || "Pending" || "Detached",
114
+ * // StatusMessage: "STRING_VALUE",
115
+ * // },
116
+ * // ],
97
117
  * // };
98
118
  *
99
119
  * ```
@@ -0,0 +1,135 @@
1
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
+ import type { DisassociateCrossAccountReplicaRequest, DisassociateCrossAccountReplicaResponse } from "../models/models_0";
3
+ /**
4
+ * @public
5
+ */
6
+ export type { __MetadataBearer };
7
+ /**
8
+ * @public
9
+ *
10
+ * The input for {@link DisassociateCrossAccountReplicaCommand}.
11
+ */
12
+ export interface DisassociateCrossAccountReplicaCommandInput extends DisassociateCrossAccountReplicaRequest {
13
+ }
14
+ /**
15
+ * @public
16
+ *
17
+ * The output of {@link DisassociateCrossAccountReplicaCommand}.
18
+ */
19
+ export interface DisassociateCrossAccountReplicaCommandOutput extends DisassociateCrossAccountReplicaResponse, __MetadataBearer {
20
+ }
21
+ declare const DisassociateCrossAccountReplicaCommand_base: {
22
+ new (input: DisassociateCrossAccountReplicaCommandInput): import("@smithy/core/client").CommandImpl<DisassociateCrossAccountReplicaCommandInput, DisassociateCrossAccountReplicaCommandOutput, import("..").SecretsManagerClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: DisassociateCrossAccountReplicaCommandInput): import("@smithy/core/client").CommandImpl<DisassociateCrossAccountReplicaCommandInput, DisassociateCrossAccountReplicaCommandOutput, import("..").SecretsManagerClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
+ };
26
+ /**
27
+ * <p>Removes the link between a primary secret in your account and a cross-account replica
28
+ * secret, and stops replication to the replica secret. Call this operation on the primary secret.
29
+ * This action removes the replica association created by <a>AssociateCrossAccountReplica</a>.</p>
30
+ * <p>Disassociating the replica from the primary does not delete the replica secret or
31
+ * convert the replica secret to a standalone secret. The replica secret remains in the other
32
+ * account and its replication status changes to <code>Detached</code>. Secrets Manager no longer sends updates
33
+ * from the primary secret to the replica secret after disassociation. To convert a detached
34
+ * replica into a standalone secret, call
35
+ * <a>StopReplicationToReplica</a> on the replica secret.</p>
36
+ * <p>You must disassociate a cross-account replica before you call <a>DeleteSecret</a> for the primary secret. The <a>DeleteSecret</a>
37
+ * call fails if any replicas are still associated with the primary secret.</p>
38
+ * <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>
39
+ * <p>
40
+ * <b>Required permissions:
41
+ * </b>
42
+ * <code>secretsmanager:DisassociateCrossAccountReplica</code>.
43
+ * For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
44
+ * IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
45
+ * and access control in Secrets Manager</a>. </p>
46
+ * @example
47
+ * Use a bare-bones client and the command you need to make an API call.
48
+ * ```javascript
49
+ * import { SecretsManagerClient, DisassociateCrossAccountReplicaCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
50
+ * // const { SecretsManagerClient, DisassociateCrossAccountReplicaCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
51
+ * // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
52
+ * const config = {}; // type is SecretsManagerClientConfig
53
+ * const client = new SecretsManagerClient(config);
54
+ * const input = { // DisassociateCrossAccountReplicaRequest
55
+ * SecretId: "STRING_VALUE", // required
56
+ * CrossAccountReplicaARN: "STRING_VALUE", // required
57
+ * };
58
+ * const command = new DisassociateCrossAccountReplicaCommand(input);
59
+ * const response = await client.send(command);
60
+ * // { // DisassociateCrossAccountReplicaResponse
61
+ * // ARN: "STRING_VALUE",
62
+ * // CrossAccountReplicaARN: "STRING_VALUE",
63
+ * // };
64
+ *
65
+ * ```
66
+ *
67
+ * @param DisassociateCrossAccountReplicaCommandInput - {@link DisassociateCrossAccountReplicaCommandInput}
68
+ * @returns {@link DisassociateCrossAccountReplicaCommandOutput}
69
+ * @see {@link DisassociateCrossAccountReplicaCommandInput} for command's `input` shape.
70
+ * @see {@link DisassociateCrossAccountReplicaCommandOutput} for command's `response` shape.
71
+ * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
72
+ *
73
+ * @throws {@link InternalServiceError} (server fault)
74
+ * <p>An error occurred on the server side.</p>
75
+ *
76
+ * @throws {@link InvalidParameterException} (client fault)
77
+ * <p>The parameter name or value is invalid.</p>
78
+ *
79
+ * @throws {@link InvalidRequestException} (client fault)
80
+ * <p>A parameter value is not valid for the current state of the
81
+ * resource.</p>
82
+ * <p>Possible causes:</p>
83
+ * <ul>
84
+ * <li>
85
+ * <p>The secret is scheduled for deletion.</p>
86
+ * </li>
87
+ * <li>
88
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
89
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
90
+ * </li>
91
+ * <li>
92
+ * <p>The secret is managed by another service, and you must use that service to update it.
93
+ * 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>
94
+ * </li>
95
+ * </ul>
96
+ *
97
+ * @throws {@link ResourceNotFoundException} (client fault)
98
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
99
+ *
100
+ * @throws {@link SecretsManagerServiceException}
101
+ * <p>Base exception class for all service exceptions from SecretsManager service.</p>
102
+ *
103
+ *
104
+ * @example To stop replicating a secret to another account from the primary account
105
+ * ```javascript
106
+ * // The following example, called from the primary account, removes the link between a primary secret and its cross-account replica and stops replication. The replica secret remains in the other account, now with a replication status of Detached.
107
+ * const input = {
108
+ * CrossAccountReplicaARN: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3",
109
+ * SecretId: "MyTestDatabaseSecret"
110
+ * };
111
+ * const command = new DisassociateCrossAccountReplicaCommand(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
+ * CrossAccountReplicaARN: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3"
117
+ * }
118
+ * *\/
119
+ * ```
120
+ *
121
+ * @public
122
+ */
123
+ export declare class DisassociateCrossAccountReplicaCommand extends DisassociateCrossAccountReplicaCommand_base {
124
+ /** @internal type navigation helper, not in runtime. */
125
+ protected static __types: {
126
+ api: {
127
+ input: DisassociateCrossAccountReplicaRequest;
128
+ output: DisassociateCrossAccountReplicaResponse;
129
+ };
130
+ sdk: {
131
+ input: DisassociateCrossAccountReplicaCommandInput;
132
+ output: DisassociateCrossAccountReplicaCommandOutput;
133
+ };
134
+ };
135
+ }
@@ -43,6 +43,7 @@ declare const GetResourcePolicyCommand_base: {
43
43
  * const client = new SecretsManagerClient(config);
44
44
  * const input = { // GetResourcePolicyRequest
45
45
  * SecretId: "STRING_VALUE", // required
46
+ * PolicyName: "STRING_VALUE",
46
47
  * };
47
48
  * const command = new GetResourcePolicyCommand(input);
48
49
  * const response = await client.send(command);
@@ -50,6 +51,7 @@ declare const GetResourcePolicyCommand_base: {
50
51
  * // ARN: "STRING_VALUE",
51
52
  * // Name: "STRING_VALUE",
52
53
  * // ResourcePolicy: "STRING_VALUE",
54
+ * // PolicyName: "STRING_VALUE",
53
55
  * // };
54
56
  *
55
57
  * ```
@@ -103,6 +105,7 @@ declare const GetResourcePolicyCommand_base: {
103
105
  * {
104
106
  * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
105
107
  * Name: "MyTestDatabaseSecret",
108
+ * PolicyName: "default",
106
109
  * ResourcePolicy: `{
107
110
  * "Version":"2012-10-17",
108
111
  * "Statement":[{
@@ -0,0 +1,138 @@
1
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
+ import type { ListResourcePoliciesRequest, ListResourcePoliciesResponse } from "../models/models_0";
3
+ /**
4
+ * @public
5
+ */
6
+ export type { __MetadataBearer };
7
+ /**
8
+ * @public
9
+ *
10
+ * The input for {@link ListResourcePoliciesCommand}.
11
+ */
12
+ export interface ListResourcePoliciesCommandInput extends ListResourcePoliciesRequest {
13
+ }
14
+ /**
15
+ * @public
16
+ *
17
+ * The output of {@link ListResourcePoliciesCommand}.
18
+ */
19
+ export interface ListResourcePoliciesCommandOutput extends ListResourcePoliciesResponse, __MetadataBearer {
20
+ }
21
+ declare const ListResourcePoliciesCommand_base: {
22
+ new (input: ListResourcePoliciesCommandInput): import("@smithy/core/client").CommandImpl<ListResourcePoliciesCommandInput, ListResourcePoliciesCommandOutput, import("..").SecretsManagerClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: ListResourcePoliciesCommandInput): import("@smithy/core/client").CommandImpl<ListResourcePoliciesCommandInput, ListResourcePoliciesCommandOutput, import("..").SecretsManagerClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
+ };
26
+ /**
27
+ * <p>Lists the resource-based policies attached to a secret. The response contains only the
28
+ * names of the policies, not their contents. Secrets Manager lists <code>default</code> first,
29
+ * followed by any other policies in alphabetical order. To get the contents of a policy,
30
+ * use <a>GetResourcePolicy</a>. You can modify only the <code>default</code>
31
+ * policy.</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:ListResourcePolicies</code>. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
37
+ * IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
38
+ * and access control in Secrets Manager</a>. </p>
39
+ * @example
40
+ * Use a bare-bones client and the command you need to make an API call.
41
+ * ```javascript
42
+ * import { SecretsManagerClient, ListResourcePoliciesCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
43
+ * // const { SecretsManagerClient, ListResourcePoliciesCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
44
+ * // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
45
+ * const config = {}; // type is SecretsManagerClientConfig
46
+ * const client = new SecretsManagerClient(config);
47
+ * const input = { // ListResourcePoliciesRequest
48
+ * SecretId: "STRING_VALUE", // required
49
+ * MaxResults: Number("int"),
50
+ * NextToken: "STRING_VALUE",
51
+ * };
52
+ * const command = new ListResourcePoliciesCommand(input);
53
+ * const response = await client.send(command);
54
+ * // { // ListResourcePoliciesResponse
55
+ * // ResourcePolicies: [ // ResourcePolicySummaryListType // required
56
+ * // { // ResourcePolicySummary
57
+ * // PolicyName: "STRING_VALUE",
58
+ * // },
59
+ * // ],
60
+ * // NextToken: "STRING_VALUE",
61
+ * // };
62
+ *
63
+ * ```
64
+ *
65
+ * @param ListResourcePoliciesCommandInput - {@link ListResourcePoliciesCommandInput}
66
+ * @returns {@link ListResourcePoliciesCommandOutput}
67
+ * @see {@link ListResourcePoliciesCommandInput} for command's `input` shape.
68
+ * @see {@link ListResourcePoliciesCommandOutput} for command's `response` shape.
69
+ * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
70
+ *
71
+ * @throws {@link InternalServiceError} (server fault)
72
+ * <p>An error occurred on the server side.</p>
73
+ *
74
+ * @throws {@link InvalidNextTokenException} (client fault)
75
+ * <p>The <code>NextToken</code> value is invalid.</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 list the resource-based policies attached to a secret
106
+ * ```javascript
107
+ * // The following example shows how to list the resource-based policies attached to a secret.
108
+ * const input = {
109
+ * SecretId: "MyTestDatabaseSecret"
110
+ * };
111
+ * const command = new ListResourcePoliciesCommand(input);
112
+ * const response = await client.send(command);
113
+ * /* response is
114
+ * {
115
+ * ResourcePolicies: [
116
+ * {
117
+ * PolicyName: "default"
118
+ * }
119
+ * ]
120
+ * }
121
+ * *\/
122
+ * ```
123
+ *
124
+ * @public
125
+ */
126
+ export declare class ListResourcePoliciesCommand extends ListResourcePoliciesCommand_base {
127
+ /** @internal type navigation helper, not in runtime. */
128
+ protected static __types: {
129
+ api: {
130
+ input: ListResourcePoliciesRequest;
131
+ output: ListResourcePoliciesResponse;
132
+ };
133
+ sdk: {
134
+ input: ListResourcePoliciesCommandInput;
135
+ output: ListResourcePoliciesCommandOutput;
136
+ };
137
+ };
138
+ }