@aws-sdk/client-secrets-manager 3.1167.0 → 3.1168.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
@@ -28,6 +28,13 @@ declare const ListSecretVersionIdsCommand_base: {
28
28
  * versions of a secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version"> Secrets Manager
29
29
  * concepts: Versions</a>.</p>
30
30
  * <p>To list the secrets in the account, use <a>ListSecrets</a>.</p>
31
+ * <note>
32
+ * <p>
33
+ * <code>ListSecretVersionIds</code> only returns versions that contain a secret
34
+ * value. To see all version IDs that have staging labels attached, including ones
35
+ * without a secret value, call <code>DescribeSecret</code> and check
36
+ * <code>VersionIdsToStages</code>.</p>
37
+ * </note>
31
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>
32
39
  * <p>
33
40
  * <b>Required permissions:
@@ -46,6 +46,7 @@ declare const PutResourcePolicyCommand_base: {
46
46
  * const input = { // PutResourcePolicyRequest
47
47
  * SecretId: "STRING_VALUE", // required
48
48
  * ResourcePolicy: "STRING_VALUE", // required
49
+ * PolicyName: "STRING_VALUE",
49
50
  * BlockPublicPolicy: true || false,
50
51
  * };
51
52
  * const command = new PutResourcePolicyCommand(input);
@@ -53,6 +54,7 @@ declare const PutResourcePolicyCommand_base: {
53
54
  * // { // PutResourcePolicyResponse
54
55
  * // ARN: "STRING_VALUE",
55
56
  * // Name: "STRING_VALUE",
57
+ * // PolicyName: "STRING_VALUE",
56
58
  * // };
57
59
  *
58
60
  * ```
@@ -122,7 +124,8 @@ declare const PutResourcePolicyCommand_base: {
122
124
  * /* response is
123
125
  * {
124
126
  * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
125
- * Name: "MyTestDatabaseSecret"
127
+ * Name: "MyTestDatabaseSecret",
128
+ * PolicyName: "default"
126
129
  * }
127
130
  * *\/
128
131
  * ```
@@ -56,7 +56,7 @@ declare const RemoveRegionsFromReplicationCommand_base: {
56
56
  * // { // ReplicationStatusType
57
57
  * // Region: "STRING_VALUE",
58
58
  * // KmsKeyId: "STRING_VALUE",
59
- * // Status: "InSync" || "Failed" || "InProgress",
59
+ * // Status: "InSync" || "Failed" || "InProgress" || "Pending" || "Detached",
60
60
  * // StatusMessage: "STRING_VALUE",
61
61
  * // LastAccessedDate: new Date("TIMESTAMP"),
62
62
  * // },
@@ -63,7 +63,7 @@ declare const ReplicateSecretToRegionsCommand_base: {
63
63
  * // { // ReplicationStatusType
64
64
  * // Region: "STRING_VALUE",
65
65
  * // KmsKeyId: "STRING_VALUE",
66
- * // Status: "InSync" || "Failed" || "InProgress",
66
+ * // Status: "InSync" || "Failed" || "InProgress" || "Pending" || "Detached",
67
67
  * // StatusMessage: "STRING_VALUE",
68
68
  * // LastAccessedDate: new Date("TIMESTAMP"),
69
69
  * // },
@@ -24,15 +24,31 @@ declare const StopReplicationToReplicaCommand_base: {
24
24
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
25
  };
26
26
  /**
27
- * <p>Removes the link between the replica secret and the primary secret and promotes the
28
- * replica to a primary secret in the replica Region.</p>
29
- * <p>You must call this operation from the Region in which you want to promote the replica
30
- * to a primary secret.</p>
27
+ * <p>Removes the link between a replica secret and its primary secret, and stops
28
+ * replication to the replica. You call this operation from the replica account or Region.
29
+ * Depending on the type of replica, the behavior is:</p>
30
+ * <ul>
31
+ * <li>
32
+ * <p>
33
+ * <b>Cross-Region replica</b>: promotes the replica to
34
+ * a standalone primary secret in the replica Region.</p>
35
+ * </li>
36
+ * <li>
37
+ * <p>
38
+ * <b>Cross-account replica</b>: promotes the replica
39
+ * in your account to a standalone secret and stops replication from its primary
40
+ * secret in the other account. Secrets Manager updates the primary secret's replication status
41
+ * to <code>Detached</code> for this replica.</p>
42
+ * </li>
43
+ * </ul>
44
+ * <p>To stop cross-account replication from the primary account instead, use <a>DisassociateCrossAccountReplica</a>.</p>
31
45
  * <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
46
  * <p>
33
47
  * <b>Required permissions:
34
48
  * </b>
35
- * <code>secretsmanager:StopReplicationToReplica</code>. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
49
+ * <code>secretsmanager:StopReplicationToReplica</code>. For cross-account
50
+ * replica secrets, you must also have <code>secretsmanager:DeleteResourcePolicy</code>
51
+ * permissions. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
36
52
  * IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
37
53
  * and access control in Secrets Manager</a>. </p>
38
54
  * @example
@@ -91,6 +107,21 @@ declare const StopReplicationToReplicaCommand_base: {
91
107
  * <p>Base exception class for all service exceptions from SecretsManager service.</p>
92
108
  *
93
109
  *
110
+ * @example To stop cross-account replication from the replica account
111
+ * ```javascript
112
+ * // The following example, called from the replica account, unlinks a cross-account replica secret from its primary secret in another account and stops replication. The secret remains in the replica account as a standalone secret.
113
+ * const input = {
114
+ * SecretId: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3"
115
+ * };
116
+ * const command = new StopReplicationToReplicaCommand(input);
117
+ * const response = await client.send(command);
118
+ * /* response is
119
+ * {
120
+ * ARN: "arn:aws:secretsmanager:us-west-2:222222222222:secret:MyReplicaSecret-a1b2c3"
121
+ * }
122
+ * *\/
123
+ * ```
124
+ *
94
125
  * @public
95
126
  */
96
127
  export declare class StopReplicationToReplicaCommand extends StopReplicationToReplicaCommand_base {
@@ -1,12 +1,15 @@
1
+ export * from "./AssociateCrossAccountReplicaCommand";
1
2
  export * from "./BatchGetSecretValueCommand";
2
3
  export * from "./CancelRotateSecretCommand";
3
4
  export * from "./CreateSecretCommand";
4
5
  export * from "./DeleteResourcePolicyCommand";
5
6
  export * from "./DeleteSecretCommand";
6
7
  export * from "./DescribeSecretCommand";
8
+ export * from "./DisassociateCrossAccountReplicaCommand";
7
9
  export * from "./GetRandomPasswordCommand";
8
10
  export * from "./GetResourcePolicyCommand";
9
11
  export * from "./GetSecretValueCommand";
12
+ export * from "./ListResourcePoliciesCommand";
10
13
  export * from "./ListSecretVersionIdsCommand";
11
14
  export * from "./ListSecretsCommand";
12
15
  export * from "./PutResourcePolicyCommand";
@@ -2,32 +2,46 @@
2
2
  * @public
3
3
  * @enum
4
4
  */
5
- export declare const FilterNameStringType: {
6
- readonly all: "all";
7
- readonly description: "description";
8
- readonly name: "name";
9
- readonly owning_service: "owning-service";
10
- readonly primary_region: "primary-region";
11
- readonly tag_key: "tag-key";
12
- readonly tag_value: "tag-value";
5
+ export declare const ReplicaRestrictionType: {
6
+ readonly NoRestriction: "NoRestriction";
7
+ readonly SameOrg: "SameOrg";
13
8
  };
14
9
  /**
15
10
  * @public
16
11
  */
17
- export type FilterNameStringType = (typeof FilterNameStringType)[keyof typeof FilterNameStringType];
12
+ export type ReplicaRestrictionType = (typeof ReplicaRestrictionType)[keyof typeof ReplicaRestrictionType];
18
13
  /**
19
14
  * @public
20
15
  * @enum
21
16
  */
22
17
  export declare const StatusType: {
18
+ readonly Detached: "Detached";
23
19
  readonly Failed: "Failed";
24
20
  readonly InProgress: "InProgress";
25
21
  readonly InSync: "InSync";
22
+ readonly Pending: "Pending";
26
23
  };
27
24
  /**
28
25
  * @public
29
26
  */
30
27
  export type StatusType = (typeof StatusType)[keyof typeof StatusType];
28
+ /**
29
+ * @public
30
+ * @enum
31
+ */
32
+ export declare const FilterNameStringType: {
33
+ readonly all: "all";
34
+ readonly description: "description";
35
+ readonly name: "name";
36
+ readonly owning_service: "owning-service";
37
+ readonly primary_region: "primary-region";
38
+ readonly tag_key: "tag-key";
39
+ readonly tag_value: "tag-value";
40
+ };
41
+ /**
42
+ * @public
43
+ */
44
+ export type FilterNameStringType = (typeof FilterNameStringType)[keyof typeof FilterNameStringType];
31
45
  /**
32
46
  * @public
33
47
  * @enum
@@ -1,19 +1,5 @@
1
1
  import type { ExceptionOptionType as __ExceptionOptionType } from "@smithy/core/client";
2
2
  import { SecretsManagerServiceException as __BaseException } from "./SecretsManagerServiceException";
3
- /**
4
- * <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
5
- * @public
6
- */
7
- export declare class DecryptionFailure extends __BaseException {
8
- static readonly shapeId: string;
9
- readonly name: "DecryptionFailure";
10
- readonly $fault: "client";
11
- Message?: string | undefined;
12
- /**
13
- * @internal
14
- */
15
- constructor(opts: __ExceptionOptionType<DecryptionFailure, __BaseException>);
16
- }
17
3
  /**
18
4
  * <p>An error occurred on the server side.</p>
19
5
  * @public
@@ -28,20 +14,6 @@ export declare class InternalServiceError extends __BaseException {
28
14
  */
29
15
  constructor(opts: __ExceptionOptionType<InternalServiceError, __BaseException>);
30
16
  }
31
- /**
32
- * <p>The <code>NextToken</code> value is invalid.</p>
33
- * @public
34
- */
35
- export declare class InvalidNextTokenException extends __BaseException {
36
- static readonly shapeId: string;
37
- readonly name: "InvalidNextTokenException";
38
- readonly $fault: "client";
39
- Message?: string | undefined;
40
- /**
41
- * @internal
42
- */
43
- constructor(opts: __ExceptionOptionType<InvalidNextTokenException, __BaseException>);
44
- }
45
17
  /**
46
18
  * <p>The parameter name or value is invalid.</p>
47
19
  * @public
@@ -85,6 +57,20 @@ export declare class InvalidRequestException extends __BaseException {
85
57
  */
86
58
  constructor(opts: __ExceptionOptionType<InvalidRequestException, __BaseException>);
87
59
  }
60
+ /**
61
+ * <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
62
+ * @public
63
+ */
64
+ export declare class LimitExceededException extends __BaseException {
65
+ static readonly shapeId: string;
66
+ readonly name: "LimitExceededException";
67
+ readonly $fault: "client";
68
+ Message?: string | undefined;
69
+ /**
70
+ * @internal
71
+ */
72
+ constructor(opts: __ExceptionOptionType<LimitExceededException, __BaseException>);
73
+ }
88
74
  /**
89
75
  * <p>Secrets Manager can't find the resource that you asked for.</p>
90
76
  * @public
@@ -100,34 +86,48 @@ export declare class ResourceNotFoundException extends __BaseException {
100
86
  constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
101
87
  }
102
88
  /**
103
- * <p>Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the
104
- * KMS key is available, enabled, and not in an invalid state. For more
105
- * information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a>.</p>
89
+ * <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
106
90
  * @public
107
91
  */
108
- export declare class EncryptionFailure extends __BaseException {
92
+ export declare class DecryptionFailure extends __BaseException {
109
93
  static readonly shapeId: string;
110
- readonly name: "EncryptionFailure";
94
+ readonly name: "DecryptionFailure";
111
95
  readonly $fault: "client";
112
96
  Message?: string | undefined;
113
97
  /**
114
98
  * @internal
115
99
  */
116
- constructor(opts: __ExceptionOptionType<EncryptionFailure, __BaseException>);
100
+ constructor(opts: __ExceptionOptionType<DecryptionFailure, __BaseException>);
117
101
  }
118
102
  /**
119
- * <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
103
+ * <p>The <code>NextToken</code> value is invalid.</p>
120
104
  * @public
121
105
  */
122
- export declare class LimitExceededException extends __BaseException {
106
+ export declare class InvalidNextTokenException extends __BaseException {
123
107
  static readonly shapeId: string;
124
- readonly name: "LimitExceededException";
108
+ readonly name: "InvalidNextTokenException";
125
109
  readonly $fault: "client";
126
110
  Message?: string | undefined;
127
111
  /**
128
112
  * @internal
129
113
  */
130
- constructor(opts: __ExceptionOptionType<LimitExceededException, __BaseException>);
114
+ constructor(opts: __ExceptionOptionType<InvalidNextTokenException, __BaseException>);
115
+ }
116
+ /**
117
+ * <p>Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the
118
+ * KMS key is available, enabled, and not in an invalid state. For more
119
+ * information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a>.</p>
120
+ * @public
121
+ */
122
+ export declare class EncryptionFailure extends __BaseException {
123
+ static readonly shapeId: string;
124
+ readonly name: "EncryptionFailure";
125
+ readonly $fault: "client";
126
+ Message?: string | undefined;
127
+ /**
128
+ * @internal
129
+ */
130
+ constructor(opts: __ExceptionOptionType<EncryptionFailure, __BaseException>);
131
131
  }
132
132
  /**
133
133
  * <p>The resource policy has syntax errors.</p>