@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.
Files changed (159) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +39 -0
  3. package/changes.json +42 -0
  4. package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
  5. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  6. package/dist-cjs/endpoint/ruleset.js +7 -0
  7. package/dist-cjs/index.js +511 -0
  8. package/dist-cjs/models/SecretsManagerServiceException.js +12 -0
  9. package/dist-cjs/models/errors.js +184 -0
  10. package/dist-cjs/runtimeConfig.browser.js +38 -0
  11. package/dist-cjs/runtimeConfig.js +53 -0
  12. package/dist-cjs/runtimeConfig.native.js +15 -0
  13. package/dist-cjs/runtimeConfig.shared.js +43 -0
  14. package/dist-cjs/schemas/schemas_0.js +665 -0
  15. package/dist-es/SecretsManager.js +61 -0
  16. package/dist-es/SecretsManagerClient.js +50 -0
  17. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  18. package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
  19. package/dist-es/commands/BatchGetSecretValueCommand.js +16 -0
  20. package/dist-es/commands/CancelRotateSecretCommand.js +16 -0
  21. package/dist-es/commands/CreateSecretCommand.js +16 -0
  22. package/dist-es/commands/DeleteResourcePolicyCommand.js +16 -0
  23. package/dist-es/commands/DeleteSecretCommand.js +16 -0
  24. package/dist-es/commands/DescribeSecretCommand.js +16 -0
  25. package/dist-es/commands/GetRandomPasswordCommand.js +16 -0
  26. package/dist-es/commands/GetResourcePolicyCommand.js +16 -0
  27. package/dist-es/commands/GetSecretValueCommand.js +16 -0
  28. package/dist-es/commands/ListSecretVersionIdsCommand.js +16 -0
  29. package/dist-es/commands/ListSecretsCommand.js +16 -0
  30. package/dist-es/commands/PutResourcePolicyCommand.js +16 -0
  31. package/dist-es/commands/PutSecretValueCommand.js +16 -0
  32. package/dist-es/commands/RemoveRegionsFromReplicationCommand.js +16 -0
  33. package/dist-es/commands/ReplicateSecretToRegionsCommand.js +16 -0
  34. package/dist-es/commands/RestoreSecretCommand.js +16 -0
  35. package/dist-es/commands/RotateSecretCommand.js +16 -0
  36. package/dist-es/commands/StopReplicationToReplicaCommand.js +16 -0
  37. package/dist-es/commands/TagResourceCommand.js +16 -0
  38. package/dist-es/commands/UntagResourceCommand.js +16 -0
  39. package/dist-es/commands/UpdateSecretCommand.js +16 -0
  40. package/dist-es/commands/UpdateSecretVersionStageCommand.js +16 -0
  41. package/dist-es/commands/ValidateResourcePolicyCommand.js +16 -0
  42. package/dist-es/commands/index.js +23 -0
  43. package/dist-es/endpoint/EndpointParameters.js +13 -0
  44. package/dist-es/endpoint/endpointResolver.js +14 -0
  45. package/dist-es/endpoint/ruleset.js +4 -0
  46. package/dist-es/extensionConfiguration.js +1 -0
  47. package/dist-es/index.js +9 -0
  48. package/dist-es/models/SecretsManagerServiceException.js +8 -0
  49. package/dist-es/models/enums.js +24 -0
  50. package/dist-es/models/errors.js +169 -0
  51. package/dist-es/models/models_0.js +1 -0
  52. package/dist-es/pagination/BatchGetSecretValuePaginator.js +4 -0
  53. package/dist-es/pagination/Interfaces.js +1 -0
  54. package/dist-es/pagination/ListSecretVersionIdsPaginator.js +4 -0
  55. package/dist-es/pagination/ListSecretsPaginator.js +4 -0
  56. package/dist-es/pagination/index.js +4 -0
  57. package/dist-es/runtimeConfig.browser.js +33 -0
  58. package/dist-es/runtimeConfig.js +48 -0
  59. package/dist-es/runtimeConfig.native.js +11 -0
  60. package/dist-es/runtimeConfig.shared.js +39 -0
  61. package/dist-es/runtimeExtensions.js +9 -0
  62. package/dist-es/schemas/schemas_0.js +661 -0
  63. package/dist-types/SecretsManager.d.ts +220 -0
  64. package/dist-types/SecretsManagerClient.d.ts +235 -0
  65. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  66. package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
  67. package/dist-types/commands/BatchGetSecretValueCommand.d.ts +210 -0
  68. package/dist-types/commands/CancelRotateSecretCommand.d.ts +135 -0
  69. package/dist-types/commands/CreateSecretCommand.d.ts +218 -0
  70. package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +126 -0
  71. package/dist-types/commands/DeleteSecretCommand.d.ts +135 -0
  72. package/dist-types/commands/DescribeSecretCommand.d.ts +137 -0
  73. package/dist-types/commands/GetRandomPasswordCommand.d.ts +135 -0
  74. package/dist-types/commands/GetResourcePolicyCommand.d.ts +138 -0
  75. package/dist-types/commands/GetSecretValueCommand.d.ts +157 -0
  76. package/dist-types/commands/ListSecretVersionIdsCommand.d.ts +151 -0
  77. package/dist-types/commands/ListSecretsCommand.d.ts +208 -0
  78. package/dist-types/commands/PutResourcePolicyCommand.d.ts +147 -0
  79. package/dist-types/commands/PutSecretValueCommand.d.ts +183 -0
  80. package/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts +122 -0
  81. package/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts +157 -0
  82. package/dist-types/commands/RestoreSecretCommand.d.ts +126 -0
  83. package/dist-types/commands/RotateSecretCommand.d.ts +180 -0
  84. package/dist-types/commands/StopReplicationToReplicaCommand.d.ts +111 -0
  85. package/dist-types/commands/TagResourceCommand.d.ts +145 -0
  86. package/dist-types/commands/UntagResourceCommand.d.ts +134 -0
  87. package/dist-types/commands/UpdateSecretCommand.d.ts +221 -0
  88. package/dist-types/commands/UpdateSecretVersionStageCommand.d.ts +187 -0
  89. package/dist-types/commands/ValidateResourcePolicyCommand.d.ts +161 -0
  90. package/dist-types/commands/index.d.ts +23 -0
  91. package/dist-types/endpoint/EndpointParameters.d.ts +50 -0
  92. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  93. package/dist-types/endpoint/ruleset.d.ts +2 -0
  94. package/dist-types/extensionConfiguration.d.ts +9 -0
  95. package/dist-types/index.d.ts +42 -0
  96. package/dist-types/models/SecretsManagerServiceException.d.ts +14 -0
  97. package/dist-types/models/enums.d.ts +56 -0
  98. package/dist-types/models/errors.d.ts +175 -0
  99. package/dist-types/models/models_0.d.ts +1957 -0
  100. package/dist-types/pagination/BatchGetSecretValuePaginator.d.ts +7 -0
  101. package/dist-types/pagination/Interfaces.d.ts +8 -0
  102. package/dist-types/pagination/ListSecretVersionIdsPaginator.d.ts +7 -0
  103. package/dist-types/pagination/ListSecretsPaginator.d.ts +7 -0
  104. package/dist-types/pagination/index.d.ts +4 -0
  105. package/dist-types/runtimeConfig.browser.d.ts +55 -0
  106. package/dist-types/runtimeConfig.d.ts +55 -0
  107. package/dist-types/runtimeConfig.native.d.ts +54 -0
  108. package/dist-types/runtimeConfig.shared.d.ts +27 -0
  109. package/dist-types/runtimeExtensions.d.ts +17 -0
  110. package/dist-types/schemas/schemas_0.d.ts +99 -0
  111. package/dist-types/ts3.4/SecretsManager.d.ts +426 -0
  112. package/dist-types/ts3.4/SecretsManagerClient.d.ts +258 -0
  113. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  114. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
  115. package/dist-types/ts3.4/commands/BatchGetSecretValueCommand.d.ts +51 -0
  116. package/dist-types/ts3.4/commands/CancelRotateSecretCommand.d.ts +51 -0
  117. package/dist-types/ts3.4/commands/CreateSecretCommand.d.ts +47 -0
  118. package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +51 -0
  119. package/dist-types/ts3.4/commands/DeleteSecretCommand.d.ts +47 -0
  120. package/dist-types/ts3.4/commands/DescribeSecretCommand.d.ts +50 -0
  121. package/dist-types/ts3.4/commands/GetRandomPasswordCommand.d.ts +51 -0
  122. package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +51 -0
  123. package/dist-types/ts3.4/commands/GetSecretValueCommand.d.ts +50 -0
  124. package/dist-types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts +51 -0
  125. package/dist-types/ts3.4/commands/ListSecretsCommand.d.ts +47 -0
  126. package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +51 -0
  127. package/dist-types/ts3.4/commands/PutSecretValueCommand.d.ts +50 -0
  128. package/dist-types/ts3.4/commands/RemoveRegionsFromReplicationCommand.d.ts +51 -0
  129. package/dist-types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts +51 -0
  130. package/dist-types/ts3.4/commands/RestoreSecretCommand.d.ts +50 -0
  131. package/dist-types/ts3.4/commands/RotateSecretCommand.d.ts +47 -0
  132. package/dist-types/ts3.4/commands/StopReplicationToReplicaCommand.d.ts +51 -0
  133. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +45 -0
  134. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +45 -0
  135. package/dist-types/ts3.4/commands/UpdateSecretCommand.d.ts +47 -0
  136. package/dist-types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts +51 -0
  137. package/dist-types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts +51 -0
  138. package/dist-types/ts3.4/commands/index.d.ts +23 -0
  139. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  140. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  141. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  142. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  143. package/dist-types/ts3.4/index.d.ts +12 -0
  144. package/dist-types/ts3.4/models/SecretsManagerServiceException.d.ts +9 -0
  145. package/dist-types/ts3.4/models/enums.d.ts +29 -0
  146. package/dist-types/ts3.4/models/errors.d.ts +97 -0
  147. package/dist-types/ts3.4/models/models_0.d.ts +333 -0
  148. package/dist-types/ts3.4/pagination/BatchGetSecretValuePaginator.d.ts +11 -0
  149. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  150. package/dist-types/ts3.4/pagination/ListSecretVersionIdsPaginator.d.ts +11 -0
  151. package/dist-types/ts3.4/pagination/ListSecretsPaginator.d.ts +11 -0
  152. package/dist-types/ts3.4/pagination/index.d.ts +4 -0
  153. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
  154. package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
  155. package/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
  156. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
  157. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  158. package/dist-types/ts3.4/schemas/schemas_0.d.ts +98 -0
  159. package/package.json +159 -0
@@ -0,0 +1,138 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { GetResourcePolicyRequest, GetResourcePolicyResponse } 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 GetResourcePolicyCommand}.
14
+ */
15
+ export interface GetResourcePolicyCommandInput extends GetResourcePolicyRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetResourcePolicyCommand}.
21
+ */
22
+ export interface GetResourcePolicyCommandOutput extends GetResourcePolicyResponse, __MetadataBearer {
23
+ }
24
+ declare const GetResourcePolicyCommand_base: {
25
+ new (input: GetResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: GetResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Retrieves the JSON text of the resource-based policy document attached to the secret.
31
+ * For more information about permissions policies attached to a secret, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-policies.html">Permissions policies attached to a secret</a>.</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:GetResourcePolicy</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, GetResourcePolicyCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
43
+ * // const { SecretsManagerClient, GetResourcePolicyCommand } = 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 = { // GetResourcePolicyRequest
48
+ * SecretId: "STRING_VALUE", // required
49
+ * };
50
+ * const command = new GetResourcePolicyCommand(input);
51
+ * const response = await client.send(command);
52
+ * // { // GetResourcePolicyResponse
53
+ * // ARN: "STRING_VALUE",
54
+ * // Name: "STRING_VALUE",
55
+ * // ResourcePolicy: "STRING_VALUE",
56
+ * // };
57
+ *
58
+ * ```
59
+ *
60
+ * @param GetResourcePolicyCommandInput - {@link GetResourcePolicyCommandInput}
61
+ * @returns {@link GetResourcePolicyCommandOutput}
62
+ * @see {@link GetResourcePolicyCommandInput} for command's `input` shape.
63
+ * @see {@link GetResourcePolicyCommandOutput} for command's `response` shape.
64
+ * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
65
+ *
66
+ * @throws {@link InternalServiceError} (server fault)
67
+ * <p>An error occurred on the server side.</p>
68
+ *
69
+ * @throws {@link InvalidParameterException} (client fault)
70
+ * <p>The parameter name or value is invalid.</p>
71
+ *
72
+ * @throws {@link InvalidRequestException} (client fault)
73
+ * <p>A parameter value is not valid for the current state of the
74
+ * resource.</p>
75
+ * <p>Possible causes:</p>
76
+ * <ul>
77
+ * <li>
78
+ * <p>The secret is scheduled for deletion.</p>
79
+ * </li>
80
+ * <li>
81
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
82
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
83
+ * </li>
84
+ * <li>
85
+ * <p>The secret is managed by another service, and you must use that service to update it.
86
+ * 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>
87
+ * </li>
88
+ * </ul>
89
+ *
90
+ * @throws {@link ResourceNotFoundException} (client fault)
91
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
92
+ *
93
+ * @throws {@link SecretsManagerServiceException}
94
+ * <p>Base exception class for all service exceptions from SecretsManager service.</p>
95
+ *
96
+ *
97
+ * @example To retrieve the resource-based policy attached to a secret
98
+ * ```javascript
99
+ * // The following example shows how to retrieve the resource-based policy that is attached to a secret.
100
+ * const input = {
101
+ * SecretId: "MyTestDatabaseSecret"
102
+ * };
103
+ * const command = new GetResourcePolicyCommand(input);
104
+ * const response = await client.send(command);
105
+ * /* response is
106
+ * {
107
+ * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
108
+ * Name: "MyTestDatabaseSecret",
109
+ * ResourcePolicy: `{
110
+ * "Version":"2012-10-17",
111
+ * "Statement":[{
112
+ * "Effect":"Allow",
113
+ * "Principal":{
114
+ * "AWS":"arn:aws:iam::123456789012:root"
115
+ * },
116
+ * "Action":"secretsmanager:GetSecretValue",
117
+ * "Resource":"*"
118
+ * }]
119
+ * }`
120
+ * }
121
+ * *\/
122
+ * ```
123
+ *
124
+ * @public
125
+ */
126
+ export declare class GetResourcePolicyCommand extends GetResourcePolicyCommand_base {
127
+ /** @internal type navigation helper, not in runtime. */
128
+ protected static __types: {
129
+ api: {
130
+ input: GetResourcePolicyRequest;
131
+ output: GetResourcePolicyResponse;
132
+ };
133
+ sdk: {
134
+ input: GetResourcePolicyCommandInput;
135
+ output: GetResourcePolicyCommandOutput;
136
+ };
137
+ };
138
+ }
@@ -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 { GetSecretValueRequest, GetSecretValueResponse } 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 GetSecretValueCommand}.
14
+ */
15
+ export interface GetSecretValueCommandInput extends GetSecretValueRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetSecretValueCommand}.
21
+ */
22
+ export interface GetSecretValueCommandOutput extends GetSecretValueResponse, __MetadataBearer {
23
+ }
24
+ declare const GetSecretValueCommand_base: {
25
+ new (input: GetSecretValueCommandInput): import("@smithy/smithy-client").CommandImpl<GetSecretValueCommandInput, GetSecretValueCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: GetSecretValueCommandInput): import("@smithy/smithy-client").CommandImpl<GetSecretValueCommandInput, GetSecretValueCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Retrieves the contents of the encrypted fields <code>SecretString</code> or
31
+ * <code>SecretBinary</code> from the specified version of a secret, whichever contains
32
+ * content.</p>
33
+ * <p>To retrieve the values for a group of secrets, call <a>BatchGetSecretValue</a>.</p>
34
+ * <p>We recommend that you cache your secret values by using client-side caching. Caching
35
+ * secrets improves speed and reduces your costs. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets.html">Cache secrets for your applications</a>.</p>
36
+ * <p>To retrieve the previous version of a secret, use <code>VersionStage</code> and
37
+ * specify AWSPREVIOUS. To revert to the previous version of a secret, call <a href="https://docs.aws.amazon.com/cli/latest/reference/secretsmanager/update-secret-version-stage.html">UpdateSecretVersionStage</a>.</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:GetSecretValue</code>. If the secret is encrypted
43
+ * using a customer-managed key instead of the Amazon Web Services managed key
44
+ * <code>aws/secretsmanager</code>, then you also need <code>kms:Decrypt</code>
45
+ * permissions for that key. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
46
+ * IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
47
+ * and access control in Secrets Manager</a>. </p>
48
+ * @example
49
+ * Use a bare-bones client and the command you need to make an API call.
50
+ * ```javascript
51
+ * import { SecretsManagerClient, GetSecretValueCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
52
+ * // const { SecretsManagerClient, GetSecretValueCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
53
+ * // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
54
+ * const config = {}; // type is SecretsManagerClientConfig
55
+ * const client = new SecretsManagerClient(config);
56
+ * const input = { // GetSecretValueRequest
57
+ * SecretId: "STRING_VALUE", // required
58
+ * VersionId: "STRING_VALUE",
59
+ * VersionStage: "STRING_VALUE",
60
+ * };
61
+ * const command = new GetSecretValueCommand(input);
62
+ * const response = await client.send(command);
63
+ * // { // GetSecretValueResponse
64
+ * // ARN: "STRING_VALUE",
65
+ * // Name: "STRING_VALUE",
66
+ * // VersionId: "STRING_VALUE",
67
+ * // SecretBinary: new Uint8Array(),
68
+ * // SecretString: "STRING_VALUE",
69
+ * // VersionStages: [ // SecretVersionStagesType
70
+ * // "STRING_VALUE",
71
+ * // ],
72
+ * // CreatedDate: new Date("TIMESTAMP"),
73
+ * // };
74
+ *
75
+ * ```
76
+ *
77
+ * @param GetSecretValueCommandInput - {@link GetSecretValueCommandInput}
78
+ * @returns {@link GetSecretValueCommandOutput}
79
+ * @see {@link GetSecretValueCommandInput} for command's `input` shape.
80
+ * @see {@link GetSecretValueCommandOutput} for command's `response` shape.
81
+ * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
82
+ *
83
+ * @throws {@link DecryptionFailure} (client fault)
84
+ * <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
85
+ *
86
+ * @throws {@link InternalServiceError} (server fault)
87
+ * <p>An error occurred on the server side.</p>
88
+ *
89
+ * @throws {@link InvalidParameterException} (client fault)
90
+ * <p>The parameter name or value is invalid.</p>
91
+ *
92
+ * @throws {@link InvalidRequestException} (client fault)
93
+ * <p>A parameter value is not valid for the current state of the
94
+ * resource.</p>
95
+ * <p>Possible causes:</p>
96
+ * <ul>
97
+ * <li>
98
+ * <p>The secret is scheduled for deletion.</p>
99
+ * </li>
100
+ * <li>
101
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
102
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
103
+ * </li>
104
+ * <li>
105
+ * <p>The secret is managed by another service, and you must use that service to update it.
106
+ * 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>
107
+ * </li>
108
+ * </ul>
109
+ *
110
+ * @throws {@link ResourceNotFoundException} (client fault)
111
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
112
+ *
113
+ * @throws {@link SecretsManagerServiceException}
114
+ * <p>Base exception class for all service exceptions from SecretsManager service.</p>
115
+ *
116
+ *
117
+ * @example To retrieve the encrypted secret value of a secret
118
+ * ```javascript
119
+ * // The following example shows how to retrieve a secret string value.
120
+ * const input = {
121
+ * SecretId: "MyTestDatabaseSecret"
122
+ * };
123
+ * const command = new GetSecretValueCommand(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
+ * CreatedDate: 1.523477145713E9,
129
+ * Name: "MyTestDatabaseSecret",
130
+ * SecretString: `{
131
+ * "username":"david",
132
+ * "password":"EXAMPLE-PASSWORD"
133
+ * }
134
+ * `,
135
+ * VersionId: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
136
+ * VersionStages: [
137
+ * "AWSPREVIOUS"
138
+ * ]
139
+ * }
140
+ * *\/
141
+ * ```
142
+ *
143
+ * @public
144
+ */
145
+ export declare class GetSecretValueCommand extends GetSecretValueCommand_base {
146
+ /** @internal type navigation helper, not in runtime. */
147
+ protected static __types: {
148
+ api: {
149
+ input: GetSecretValueRequest;
150
+ output: GetSecretValueResponse;
151
+ };
152
+ sdk: {
153
+ input: GetSecretValueCommandInput;
154
+ output: GetSecretValueCommandOutput;
155
+ };
156
+ };
157
+ }
@@ -0,0 +1,151 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { ListSecretVersionIdsRequest, ListSecretVersionIdsResponse } 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 ListSecretVersionIdsCommand}.
14
+ */
15
+ export interface ListSecretVersionIdsCommandInput extends ListSecretVersionIdsRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListSecretVersionIdsCommand}.
21
+ */
22
+ export interface ListSecretVersionIdsCommandOutput extends ListSecretVersionIdsResponse, __MetadataBearer {
23
+ }
24
+ declare const ListSecretVersionIdsCommand_base: {
25
+ new (input: ListSecretVersionIdsCommandInput): import("@smithy/smithy-client").CommandImpl<ListSecretVersionIdsCommandInput, ListSecretVersionIdsCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: ListSecretVersionIdsCommandInput): import("@smithy/smithy-client").CommandImpl<ListSecretVersionIdsCommandInput, ListSecretVersionIdsCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Lists the versions of a secret. Secrets Manager uses staging labels to indicate the different
31
+ * 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
32
+ * concepts: Versions</a>.</p>
33
+ * <p>To list the secrets in the account, use <a>ListSecrets</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:ListSecretVersionIds</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, ListSecretVersionIdsCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
45
+ * // const { SecretsManagerClient, ListSecretVersionIdsCommand } = 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 = { // ListSecretVersionIdsRequest
50
+ * SecretId: "STRING_VALUE", // required
51
+ * MaxResults: Number("int"),
52
+ * NextToken: "STRING_VALUE",
53
+ * IncludeDeprecated: true || false,
54
+ * };
55
+ * const command = new ListSecretVersionIdsCommand(input);
56
+ * const response = await client.send(command);
57
+ * // { // ListSecretVersionIdsResponse
58
+ * // Versions: [ // SecretVersionsListType
59
+ * // { // SecretVersionsListEntry
60
+ * // VersionId: "STRING_VALUE",
61
+ * // VersionStages: [ // SecretVersionStagesType
62
+ * // "STRING_VALUE",
63
+ * // ],
64
+ * // LastAccessedDate: new Date("TIMESTAMP"),
65
+ * // CreatedDate: new Date("TIMESTAMP"),
66
+ * // KmsKeyIds: [ // KmsKeyIdListType
67
+ * // "STRING_VALUE",
68
+ * // ],
69
+ * // },
70
+ * // ],
71
+ * // NextToken: "STRING_VALUE",
72
+ * // ARN: "STRING_VALUE",
73
+ * // Name: "STRING_VALUE",
74
+ * // };
75
+ *
76
+ * ```
77
+ *
78
+ * @param ListSecretVersionIdsCommandInput - {@link ListSecretVersionIdsCommandInput}
79
+ * @returns {@link ListSecretVersionIdsCommandOutput}
80
+ * @see {@link ListSecretVersionIdsCommandInput} for command's `input` shape.
81
+ * @see {@link ListSecretVersionIdsCommandOutput} 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 InvalidNextTokenException} (client fault)
88
+ * <p>The <code>NextToken</code> value is invalid.</p>
89
+ *
90
+ * @throws {@link InvalidParameterException} (client fault)
91
+ * <p>The parameter name or value is invalid.</p>
92
+ *
93
+ * @throws {@link ResourceNotFoundException} (client fault)
94
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
95
+ *
96
+ * @throws {@link SecretsManagerServiceException}
97
+ * <p>Base exception class for all service exceptions from SecretsManager service.</p>
98
+ *
99
+ *
100
+ * @example To list all of the secret versions associated with a secret
101
+ * ```javascript
102
+ * // The following example shows how to retrieve a list of all of the versions of a secret, including those without any staging labels.
103
+ * const input = {
104
+ * IncludeDeprecated: true,
105
+ * SecretId: "MyTestDatabaseSecret"
106
+ * };
107
+ * const command = new ListSecretVersionIdsCommand(input);
108
+ * const response = await client.send(command);
109
+ * /* response is
110
+ * {
111
+ * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
112
+ * Name: "MyTestDatabaseSecret",
113
+ * Versions: [
114
+ * {
115
+ * CreatedDate: 1.523477145713E9,
116
+ * VersionId: "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE",
117
+ * VersionStages: [
118
+ * "AWSPREVIOUS"
119
+ * ]
120
+ * },
121
+ * {
122
+ * CreatedDate: 1.523486221391E9,
123
+ * VersionId: "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
124
+ * VersionStages: [
125
+ * "AWSCURRENT"
126
+ * ]
127
+ * },
128
+ * {
129
+ * CreatedDate: 1.51197446236E9,
130
+ * VersionId: "EXAMPLE3-90ab-cdef-fedc-ba987EXAMPLE;"
131
+ * }
132
+ * ]
133
+ * }
134
+ * *\/
135
+ * ```
136
+ *
137
+ * @public
138
+ */
139
+ export declare class ListSecretVersionIdsCommand extends ListSecretVersionIdsCommand_base {
140
+ /** @internal type navigation helper, not in runtime. */
141
+ protected static __types: {
142
+ api: {
143
+ input: ListSecretVersionIdsRequest;
144
+ output: ListSecretVersionIdsResponse;
145
+ };
146
+ sdk: {
147
+ input: ListSecretVersionIdsCommandInput;
148
+ output: ListSecretVersionIdsCommandOutput;
149
+ };
150
+ };
151
+ }
@@ -0,0 +1,208 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { ListSecretsRequest, ListSecretsResponse } 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 ListSecretsCommand}.
14
+ */
15
+ export interface ListSecretsCommandInput extends ListSecretsRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListSecretsCommand}.
21
+ */
22
+ export interface ListSecretsCommandOutput extends ListSecretsResponse, __MetadataBearer {
23
+ }
24
+ declare const ListSecretsCommand_base: {
25
+ new (input: ListSecretsCommandInput): import("@smithy/smithy-client").CommandImpl<ListSecretsCommandInput, ListSecretsCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [ListSecretsCommandInput]): import("@smithy/smithy-client").CommandImpl<ListSecretsCommandInput, ListSecretsCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Lists the secrets that are stored by Secrets Manager in the Amazon Web Services account, not including secrets
31
+ * that are marked for deletion. To see secrets marked for deletion, use the Secrets Manager
32
+ * console.</p>
33
+ * <p>All Secrets Manager operations are eventually consistent. ListSecrets might not
34
+ * reflect changes from the last five minutes. You can get more recent information for a
35
+ * specific secret by calling <a>DescribeSecret</a>.</p>
36
+ * <p>To list the versions of a secret, use <a>ListSecretVersionIds</a>.</p>
37
+ * <p>To retrieve the values for the secrets, call <a>BatchGetSecretValue</a> or
38
+ * <a>GetSecretValue</a>.</p>
39
+ * <p>For information about finding secrets in the console, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_search-secret.html">Find secrets in
40
+ * Secrets Manager</a>.</p>
41
+ * <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>
42
+ * <p>
43
+ * <b>Required permissions:
44
+ * </b>
45
+ * <code>secretsmanager:ListSecrets</code>. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
46
+ * IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
47
+ * and access control in Secrets Manager</a>. </p>
48
+ * @example
49
+ * Use a bare-bones client and the command you need to make an API call.
50
+ * ```javascript
51
+ * import { SecretsManagerClient, ListSecretsCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
52
+ * // const { SecretsManagerClient, ListSecretsCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
53
+ * // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
54
+ * const config = {}; // type is SecretsManagerClientConfig
55
+ * const client = new SecretsManagerClient(config);
56
+ * const input = { // ListSecretsRequest
57
+ * IncludePlannedDeletion: true || false,
58
+ * MaxResults: Number("int"),
59
+ * NextToken: "STRING_VALUE",
60
+ * Filters: [ // FiltersListType
61
+ * { // Filter
62
+ * Key: "description" || "name" || "tag-key" || "tag-value" || "primary-region" || "owning-service" || "all",
63
+ * Values: [ // FilterValuesStringList
64
+ * "STRING_VALUE",
65
+ * ],
66
+ * },
67
+ * ],
68
+ * SortOrder: "asc" || "desc",
69
+ * SortBy: "created-date" || "last-accessed-date" || "last-changed-date" || "name",
70
+ * };
71
+ * const command = new ListSecretsCommand(input);
72
+ * const response = await client.send(command);
73
+ * // { // ListSecretsResponse
74
+ * // SecretList: [ // SecretListType
75
+ * // { // SecretListEntry
76
+ * // ARN: "STRING_VALUE",
77
+ * // Name: "STRING_VALUE",
78
+ * // Type: "STRING_VALUE",
79
+ * // Description: "STRING_VALUE",
80
+ * // KmsKeyId: "STRING_VALUE",
81
+ * // RotationEnabled: true || false,
82
+ * // RotationLambdaARN: "STRING_VALUE",
83
+ * // RotationRules: { // RotationRulesType
84
+ * // AutomaticallyAfterDays: Number("long"),
85
+ * // Duration: "STRING_VALUE",
86
+ * // ScheduleExpression: "STRING_VALUE",
87
+ * // },
88
+ * // ExternalSecretRotationMetadata: [ // ExternalSecretRotationMetadataType
89
+ * // { // ExternalSecretRotationMetadataItem
90
+ * // Key: "STRING_VALUE",
91
+ * // Value: "STRING_VALUE",
92
+ * // },
93
+ * // ],
94
+ * // ExternalSecretRotationRoleArn: "STRING_VALUE",
95
+ * // LastRotatedDate: new Date("TIMESTAMP"),
96
+ * // LastChangedDate: new Date("TIMESTAMP"),
97
+ * // LastAccessedDate: new Date("TIMESTAMP"),
98
+ * // DeletedDate: new Date("TIMESTAMP"),
99
+ * // NextRotationDate: new Date("TIMESTAMP"),
100
+ * // Tags: [ // TagListType
101
+ * // { // Tag
102
+ * // Key: "STRING_VALUE",
103
+ * // Value: "STRING_VALUE",
104
+ * // },
105
+ * // ],
106
+ * // SecretVersionsToStages: { // SecretVersionsToStagesMapType
107
+ * // "<keys>": [ // SecretVersionStagesType
108
+ * // "STRING_VALUE",
109
+ * // ],
110
+ * // },
111
+ * // OwningService: "STRING_VALUE",
112
+ * // CreatedDate: new Date("TIMESTAMP"),
113
+ * // PrimaryRegion: "STRING_VALUE",
114
+ * // },
115
+ * // ],
116
+ * // NextToken: "STRING_VALUE",
117
+ * // };
118
+ *
119
+ * ```
120
+ *
121
+ * @param ListSecretsCommandInput - {@link ListSecretsCommandInput}
122
+ * @returns {@link ListSecretsCommandOutput}
123
+ * @see {@link ListSecretsCommandInput} for command's `input` shape.
124
+ * @see {@link ListSecretsCommandOutput} for command's `response` shape.
125
+ * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
126
+ *
127
+ * @throws {@link InternalServiceError} (server fault)
128
+ * <p>An error occurred on the server side.</p>
129
+ *
130
+ * @throws {@link InvalidNextTokenException} (client fault)
131
+ * <p>The <code>NextToken</code> value is invalid.</p>
132
+ *
133
+ * @throws {@link InvalidParameterException} (client fault)
134
+ * <p>The parameter name or value is invalid.</p>
135
+ *
136
+ * @throws {@link InvalidRequestException} (client fault)
137
+ * <p>A parameter value is not valid for the current state of the
138
+ * resource.</p>
139
+ * <p>Possible causes:</p>
140
+ * <ul>
141
+ * <li>
142
+ * <p>The secret is scheduled for deletion.</p>
143
+ * </li>
144
+ * <li>
145
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
146
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
147
+ * </li>
148
+ * <li>
149
+ * <p>The secret is managed by another service, and you must use that service to update it.
150
+ * 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>
151
+ * </li>
152
+ * </ul>
153
+ *
154
+ * @throws {@link SecretsManagerServiceException}
155
+ * <p>Base exception class for all service exceptions from SecretsManager service.</p>
156
+ *
157
+ *
158
+ * @example To list the secrets in your account
159
+ * ```javascript
160
+ * // The following example shows how to list all of the secrets in your account.
161
+ * const input = { /* empty *\/ };
162
+ * const command = new ListSecretsCommand(input);
163
+ * const response = await client.send(command);
164
+ * /* response is
165
+ * {
166
+ * SecretList: [
167
+ * {
168
+ * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
169
+ * Description: "My test database secret",
170
+ * LastChangedDate: 1.523477145729E9,
171
+ * Name: "MyTestDatabaseSecret",
172
+ * SecretVersionsToStages: {
173
+ * EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE: [
174
+ * "AWSCURRENT"
175
+ * ]
176
+ * }
177
+ * },
178
+ * {
179
+ * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret1-d4e5f6",
180
+ * Description: "Another secret created for a different database",
181
+ * LastChangedDate: 1.523482025685E9,
182
+ * Name: "MyTestDatabaseSecret1",
183
+ * SecretVersionsToStages: {
184
+ * EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE: [
185
+ * "AWSCURRENT"
186
+ * ]
187
+ * }
188
+ * }
189
+ * ]
190
+ * }
191
+ * *\/
192
+ * ```
193
+ *
194
+ * @public
195
+ */
196
+ export declare class ListSecretsCommand extends ListSecretsCommand_base {
197
+ /** @internal type navigation helper, not in runtime. */
198
+ protected static __types: {
199
+ api: {
200
+ input: ListSecretsRequest;
201
+ output: ListSecretsResponse;
202
+ };
203
+ sdk: {
204
+ input: ListSecretsCommandInput;
205
+ output: ListSecretsCommandOutput;
206
+ };
207
+ };
208
+ }