@aws-sdk/client-sts 3.332.0 → 3.335.1

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 (49) hide show
  1. package/CHANGELOG.md +3735 -0
  2. package/dist-cjs/commands/AssumeRoleCommand.js +2 -1
  3. package/dist-cjs/commands/AssumeRoleWithSAMLCommand.js +3 -2
  4. package/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js +3 -2
  5. package/dist-cjs/commands/GetFederationTokenCommand.js +2 -1
  6. package/dist-cjs/commands/GetSessionTokenCommand.js +2 -1
  7. package/dist-cjs/models/models_0.js +42 -1
  8. package/dist-cjs/protocols/Aws_query.js +1 -1
  9. package/dist-es/commands/AssumeRoleCommand.js +2 -1
  10. package/dist-es/commands/AssumeRoleWithSAMLCommand.js +3 -2
  11. package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +3 -2
  12. package/dist-es/commands/GetFederationTokenCommand.js +2 -1
  13. package/dist-es/commands/GetSessionTokenCommand.js +2 -1
  14. package/dist-es/models/models_0.js +33 -0
  15. package/dist-es/protocols/Aws_query.js +1 -1
  16. package/dist-types/STSClient.d.ts +3 -2
  17. package/dist-types/endpoint/EndpointParameters.d.ts +2 -1
  18. package/dist-types/models/models_0.d.ts +32 -0
  19. package/dist-types/protocols/Aws_query.d.ts +2 -2
  20. package/dist-types/runtimeConfig.browser.d.ts +13 -13
  21. package/dist-types/runtimeConfig.d.ts +9 -9
  22. package/dist-types/runtimeConfig.native.d.ts +14 -14
  23. package/dist-types/runtimeConfig.shared.d.ts +4 -4
  24. package/dist-types/ts3.4/STS.d.ts +69 -141
  25. package/dist-types/ts3.4/STSClient.d.ts +173 -159
  26. package/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +261 -34
  27. package/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +292 -38
  28. package/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +301 -41
  29. package/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +125 -41
  30. package/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +86 -37
  31. package/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +124 -38
  32. package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +235 -38
  33. package/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +162 -37
  34. package/dist-types/ts3.4/commands/index.d.ts +8 -8
  35. package/dist-types/ts3.4/defaultRoleAssumers.d.ts +20 -22
  36. package/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +35 -23
  37. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +22 -35
  38. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +5 -8
  39. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -2
  40. package/dist-types/ts3.4/index.d.ts +6 -6
  41. package/dist-types/ts3.4/models/STSServiceException.d.ts +12 -7
  42. package/dist-types/ts3.4/models/index.d.ts +1 -1
  43. package/dist-types/ts3.4/models/models_0.d.ts +1110 -179
  44. package/dist-types/ts3.4/protocols/Aws_query.d.ts +74 -101
  45. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +43 -95
  46. package/dist-types/ts3.4/runtimeConfig.d.ts +43 -93
  47. package/dist-types/ts3.4/runtimeConfig.native.d.ts +42 -84
  48. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +18 -18
  49. package/package.json +5 -4
@@ -1,34 +1,261 @@
1
- import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
- import { Command as $Command } from "@aws-sdk/smithy-client";
3
- import {
4
- Handler,
5
- HttpHandlerOptions as __HttpHandlerOptions,
6
- MetadataBearer as __MetadataBearer,
7
- MiddlewareStack,
8
- } from "@aws-sdk/types";
9
- import { AssumeRoleRequest, AssumeRoleResponse } from "../models/models_0";
10
- import {
11
- ServiceInputTypes,
12
- ServiceOutputTypes,
13
- STSClientResolvedConfig,
14
- } from "../STSClient";
15
- export interface AssumeRoleCommandInput extends AssumeRoleRequest {}
16
- export interface AssumeRoleCommandOutput
17
- extends AssumeRoleResponse,
18
- __MetadataBearer {}
19
- export declare class AssumeRoleCommand extends $Command<
20
- AssumeRoleCommandInput,
21
- AssumeRoleCommandOutput,
22
- STSClientResolvedConfig
23
- > {
24
- readonly input: AssumeRoleCommandInput;
25
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
26
- constructor(input: AssumeRoleCommandInput);
27
- resolveMiddleware(
28
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
29
- configuration: STSClientResolvedConfig,
30
- options?: __HttpHandlerOptions
31
- ): Handler<AssumeRoleCommandInput, AssumeRoleCommandOutput>;
32
- private serialize;
33
- private deserialize;
34
- }
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { AssumeRoleRequest, AssumeRoleResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
6
+ /**
7
+ * @public
8
+ *
9
+ * The input for {@link AssumeRoleCommand}.
10
+ */
11
+ export interface AssumeRoleCommandInput extends AssumeRoleRequest {
12
+ }
13
+ /**
14
+ * @public
15
+ *
16
+ * The output of {@link AssumeRoleCommand}.
17
+ */
18
+ export interface AssumeRoleCommandOutput extends AssumeRoleResponse, __MetadataBearer {
19
+ }
20
+ /**
21
+ * @public
22
+ * <p>Returns a set of temporary security credentials that you can use to access Amazon Web Services
23
+ * resources. These temporary credentials consist of an access key ID, a secret access key,
24
+ * and a security token. Typically, you use <code>AssumeRole</code> within your account or for
25
+ * cross-account access. For a comparison of <code>AssumeRole</code> with other API operations
26
+ * that produce temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
27
+ * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
28
+ * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
29
+ * <p>
30
+ * <b>Permissions</b>
31
+ * </p>
32
+ * <p>The temporary security credentials created by <code>AssumeRole</code> can be used to
33
+ * make API calls to any Amazon Web Services service with the following exception: You cannot call the
34
+ * Amazon Web Services STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
35
+ * operations.</p>
36
+ * <p>(Optional) You can pass inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policies</a> to
37
+ * this operation. You can pass a single JSON policy document to use as an inline session
38
+ * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as
39
+ * managed session policies. The plaintext that you use for both inline and managed session
40
+ * policies can't exceed 2,048 characters. Passing policies to this operation returns new
41
+ * temporary credentials. The resulting session's permissions are the intersection of the
42
+ * role's identity-based policy and the session policies. You can use the role's temporary
43
+ * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
44
+ * the role. You cannot use session policies to grant more permissions than those allowed
45
+ * by the identity-based policy of the role that is being assumed. For more information, see
46
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
47
+ * Policies</a> in the <i>IAM User Guide</i>.</p>
48
+ * <p>When you create a role, you create two policies: a role trust policy that specifies
49
+ * <i>who</i> can assume the role, and a permissions policy that specifies
50
+ * <i>what</i> can be done with the role. You specify the trusted principal
51
+ * that is allowed to assume the role in the role trust policy.</p>
52
+ * <p>To assume a role from a different account, your Amazon Web Services account must be trusted by the
53
+ * role. The trust relationship is defined in the role's trust policy when the role is
54
+ * created. That trust policy states which accounts are allowed to delegate that access to
55
+ * users in the account. </p>
56
+ * <p>A user who wants to access a role in a different account must also have permissions that
57
+ * are delegated from the account administrator. The administrator must attach a policy
58
+ * that allows the user to call <code>AssumeRole</code> for the ARN of the role in the other
59
+ * account.</p>
60
+ * <p>To allow a user to assume a role in the same account, you can do either of the
61
+ * following:</p>
62
+ * <ul>
63
+ * <li>
64
+ * <p>Attach a policy to the user that allows the user to call <code>AssumeRole</code>
65
+ * (as long as the role's trust policy trusts the account).</p>
66
+ * </li>
67
+ * <li>
68
+ * <p>Add the user as a principal directly in the role's trust policy.</p>
69
+ * </li>
70
+ * </ul>
71
+ * <p>You can do either because the role’s trust policy acts as an IAM resource-based
72
+ * policy. When a resource-based policy grants access to a principal in the same account, no
73
+ * additional identity-based policy is required. For more information about trust policies and
74
+ * resource-based policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">IAM Policies</a> in the
75
+ * <i>IAM User Guide</i>.</p>
76
+ * <p>
77
+ * <b>Tags</b>
78
+ * </p>
79
+ * <p>(Optional) You can pass tag key-value pairs to your session. These tags are called
80
+ * session tags. For more information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the
81
+ * <i>IAM User Guide</i>.</p>
82
+ * <p>An administrator must grant you the permissions necessary to pass session tags. The
83
+ * administrator can also create granular permissions to allow you to pass only specific
84
+ * session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags
85
+ * for Attribute-Based Access Control</a> in the
86
+ * <i>IAM User Guide</i>.</p>
87
+ * <p>You can set the session tags as transitive. Transitive tags persist during role
88
+ * chaining. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining">Chaining Roles
89
+ * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
90
+ * <p>
91
+ * <b>Using MFA with AssumeRole</b>
92
+ * </p>
93
+ * <p>(Optional) You can include multi-factor authentication (MFA) information when you call
94
+ * <code>AssumeRole</code>. This is useful for cross-account scenarios to ensure that the
95
+ * user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that
96
+ * scenario, the trust policy of the role being assumed includes a condition that tests for
97
+ * MFA authentication. If the caller does not include valid MFA information, the request to
98
+ * assume the role is denied. The condition in a trust policy that tests for MFA
99
+ * authentication might look like the following example.</p>
100
+ * <p>
101
+ * <code>"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}</code>
102
+ * </p>
103
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html">Configuring MFA-Protected API Access</a>
104
+ * in the <i>IAM User Guide</i> guide.</p>
105
+ * <p>To use MFA with <code>AssumeRole</code>, you pass values for the
106
+ * <code>SerialNumber</code> and <code>TokenCode</code> parameters. The
107
+ * <code>SerialNumber</code> value identifies the user's hardware or virtual MFA device.
108
+ * The <code>TokenCode</code> is the time-based one-time password (TOTP) that the MFA device
109
+ * produces. </p>
110
+ * @example
111
+ * Use a bare-bones client and the command you need to make an API call.
112
+ * ```javascript
113
+ * import { STSClient, AssumeRoleCommand } from "@aws-sdk/client-sts"; // ES Modules import
114
+ * // const { STSClient, AssumeRoleCommand } = require("@aws-sdk/client-sts"); // CommonJS import
115
+ * const client = new STSClient(config);
116
+ * const input = { // AssumeRoleRequest
117
+ * RoleArn: "STRING_VALUE", // required
118
+ * RoleSessionName: "STRING_VALUE", // required
119
+ * PolicyArns: [ // policyDescriptorListType
120
+ * { // PolicyDescriptorType
121
+ * arn: "STRING_VALUE",
122
+ * },
123
+ * ],
124
+ * Policy: "STRING_VALUE",
125
+ * DurationSeconds: Number("int"),
126
+ * Tags: [ // tagListType
127
+ * { // Tag
128
+ * Key: "STRING_VALUE", // required
129
+ * Value: "STRING_VALUE", // required
130
+ * },
131
+ * ],
132
+ * TransitiveTagKeys: [ // tagKeyListType
133
+ * "STRING_VALUE",
134
+ * ],
135
+ * ExternalId: "STRING_VALUE",
136
+ * SerialNumber: "STRING_VALUE",
137
+ * TokenCode: "STRING_VALUE",
138
+ * SourceIdentity: "STRING_VALUE",
139
+ * };
140
+ * const command = new AssumeRoleCommand(input);
141
+ * const response = await client.send(command);
142
+ * // { // AssumeRoleResponse
143
+ * // Credentials: { // Credentials
144
+ * // AccessKeyId: "STRING_VALUE", // required
145
+ * // SecretAccessKey: "STRING_VALUE", // required
146
+ * // SessionToken: "STRING_VALUE", // required
147
+ * // Expiration: new Date("TIMESTAMP"), // required
148
+ * // },
149
+ * // AssumedRoleUser: { // AssumedRoleUser
150
+ * // AssumedRoleId: "STRING_VALUE", // required
151
+ * // Arn: "STRING_VALUE", // required
152
+ * // },
153
+ * // PackedPolicySize: Number("int"),
154
+ * // SourceIdentity: "STRING_VALUE",
155
+ * // };
156
+ *
157
+ * ```
158
+ *
159
+ * @param AssumeRoleCommandInput - {@link AssumeRoleCommandInput}
160
+ * @returns {@link AssumeRoleCommandOutput}
161
+ * @see {@link AssumeRoleCommandInput} for command's `input` shape.
162
+ * @see {@link AssumeRoleCommandOutput} for command's `response` shape.
163
+ * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
164
+ *
165
+ * @throws {@link ExpiredTokenException} (client fault)
166
+ * <p>The web identity token that was passed is expired or is not valid. Get a new identity
167
+ * token from the identity provider and then retry the request.</p>
168
+ *
169
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
170
+ * <p>The request was rejected because the policy document was malformed. The error message
171
+ * describes the specific error.</p>
172
+ *
173
+ * @throws {@link PackedPolicyTooLargeException} (client fault)
174
+ * <p>The request was rejected because the total packed size of the session policies and
175
+ * session tags combined was too large. An Amazon Web Services conversion compresses the session policy
176
+ * document, session policy ARNs, and session tags into a packed binary format that has a
177
+ * separate limit. The error message indicates by percentage how close the policies and
178
+ * tags are to the upper size limit. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in
179
+ * the <i>IAM User Guide</i>.</p>
180
+ * <p>You could receive this error even though you meet other defined session policy and
181
+ * session tag limits. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length">IAM and STS Entity
182
+ * Character Limits</a> in the <i>IAM User Guide</i>.</p>
183
+ *
184
+ * @throws {@link RegionDisabledException} (client fault)
185
+ * <p>STS is not activated in the requested region for the account that is being asked to
186
+ * generate credentials. The account administrator must use the IAM console to activate STS
187
+ * in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
188
+ * Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>IAM User
189
+ * Guide</i>.</p>
190
+ *
191
+ * @throws {@link STSServiceException}
192
+ * <p>Base exception class for all service exceptions from STS service.</p>
193
+ *
194
+ * @example To assume a role
195
+ * ```javascript
196
+ * //
197
+ * const input = {
198
+ * "ExternalId": "123ABC",
199
+ * "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
200
+ * "RoleArn": "arn:aws:iam::123456789012:role/demo",
201
+ * "RoleSessionName": "testAssumeRoleSession",
202
+ * "Tags": [
203
+ * {
204
+ * "Key": "Project",
205
+ * "Value": "Unicorn"
206
+ * },
207
+ * {
208
+ * "Key": "Team",
209
+ * "Value": "Automation"
210
+ * },
211
+ * {
212
+ * "Key": "Cost-Center",
213
+ * "Value": "12345"
214
+ * }
215
+ * ],
216
+ * "TransitiveTagKeys": [
217
+ * "Project",
218
+ * "Cost-Center"
219
+ * ]
220
+ * };
221
+ * const command = new AssumeRoleCommand(input);
222
+ * const response = await client.send(command);
223
+ * /* response ==
224
+ * {
225
+ * "AssumedRoleUser": {
226
+ * "Arn": "arn:aws:sts::123456789012:assumed-role/demo/Bob",
227
+ * "AssumedRoleId": "ARO123EXAMPLE123:Bob"
228
+ * },
229
+ * "Credentials": {
230
+ * "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
231
+ * "Expiration": "2011-07-15T23:28:33.359Z",
232
+ * "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
233
+ * "SessionToken": "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA=="
234
+ * },
235
+ * "PackedPolicySize": 8
236
+ * }
237
+ * *\/
238
+ * // example id: to-assume-a-role-1480532402212
239
+ * ```
240
+ *
241
+ */
242
+ export declare class AssumeRoleCommand extends $Command<AssumeRoleCommandInput, AssumeRoleCommandOutput, STSClientResolvedConfig> {
243
+ readonly input: AssumeRoleCommandInput;
244
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
245
+ /**
246
+ * @public
247
+ */
248
+ constructor(input: AssumeRoleCommandInput);
249
+ /**
250
+ * @internal
251
+ */
252
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleCommandInput, AssumeRoleCommandOutput>;
253
+ /**
254
+ * @internal
255
+ */
256
+ private serialize;
257
+ /**
258
+ * @internal
259
+ */
260
+ private deserialize;
261
+ }
@@ -1,38 +1,292 @@
1
- import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
- import { Command as $Command } from "@aws-sdk/smithy-client";
3
- import {
4
- Handler,
5
- HttpHandlerOptions as __HttpHandlerOptions,
6
- MetadataBearer as __MetadataBearer,
7
- MiddlewareStack,
8
- } from "@aws-sdk/types";
9
- import {
10
- AssumeRoleWithSAMLRequest,
11
- AssumeRoleWithSAMLResponse,
12
- } from "../models/models_0";
13
- import {
14
- ServiceInputTypes,
15
- ServiceOutputTypes,
16
- STSClientResolvedConfig,
17
- } from "../STSClient";
18
- export interface AssumeRoleWithSAMLCommandInput
19
- extends AssumeRoleWithSAMLRequest {}
20
- export interface AssumeRoleWithSAMLCommandOutput
21
- extends AssumeRoleWithSAMLResponse,
22
- __MetadataBearer {}
23
- export declare class AssumeRoleWithSAMLCommand extends $Command<
24
- AssumeRoleWithSAMLCommandInput,
25
- AssumeRoleWithSAMLCommandOutput,
26
- STSClientResolvedConfig
27
- > {
28
- readonly input: AssumeRoleWithSAMLCommandInput;
29
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
30
- constructor(input: AssumeRoleWithSAMLCommandInput);
31
- resolveMiddleware(
32
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
33
- configuration: STSClientResolvedConfig,
34
- options?: __HttpHandlerOptions
35
- ): Handler<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput>;
36
- private serialize;
37
- private deserialize;
38
- }
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { AssumeRoleWithSAMLRequest, AssumeRoleWithSAMLResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
6
+ /**
7
+ * @public
8
+ *
9
+ * The input for {@link AssumeRoleWithSAMLCommand}.
10
+ */
11
+ export interface AssumeRoleWithSAMLCommandInput extends AssumeRoleWithSAMLRequest {
12
+ }
13
+ /**
14
+ * @public
15
+ *
16
+ * The output of {@link AssumeRoleWithSAMLCommand}.
17
+ */
18
+ export interface AssumeRoleWithSAMLCommandOutput extends AssumeRoleWithSAMLResponse, __MetadataBearer {
19
+ }
20
+ /**
21
+ * @public
22
+ * <p>Returns a set of temporary security credentials for users who have been authenticated
23
+ * via a SAML authentication response. This operation provides a mechanism for tying an
24
+ * enterprise identity store or directory to role-based Amazon Web Services access without user-specific
25
+ * credentials or configuration. For a comparison of <code>AssumeRoleWithSAML</code> with the
26
+ * other API operations that produce temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
27
+ * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
28
+ * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
29
+ * <p>The temporary security credentials returned by this operation consist of an access key
30
+ * ID, a secret access key, and a security token. Applications can use these temporary
31
+ * security credentials to sign calls to Amazon Web Services services.</p>
32
+ * <p>
33
+ * <b>Session Duration</b>
34
+ * </p>
35
+ * <p>By default, the temporary security credentials created by
36
+ * <code>AssumeRoleWithSAML</code> last for one hour. However, you can use the optional
37
+ * <code>DurationSeconds</code> parameter to specify the duration of your session. Your
38
+ * role session lasts for the duration that you specify, or until the time specified in the
39
+ * SAML authentication response's <code>SessionNotOnOrAfter</code> value, whichever is
40
+ * shorter. You can provide a <code>DurationSeconds</code> value from 900 seconds (15 minutes)
41
+ * up to the maximum session duration setting for the role. This setting can have a value from
42
+ * 1 hour to 12 hours. To learn how to view the maximum value for your role, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View the
43
+ * Maximum Session Duration Setting for a Role</a> in the
44
+ * <i>IAM User Guide</i>. The maximum session duration limit applies when
45
+ * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
46
+ * commands. However the limit does not apply when you use those operations to create a
47
+ * console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM Roles</a> in the
48
+ * <i>IAM User Guide</i>.</p>
49
+ * <note>
50
+ * <p>
51
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining">Role chaining</a> limits your CLI or Amazon Web Services API role
52
+ * session to a maximum of one hour. When you use the <code>AssumeRole</code> API operation
53
+ * to assume a role, you can specify the duration of your role session with the
54
+ * <code>DurationSeconds</code> parameter. You can specify a parameter value of up to
55
+ * 43200 seconds (12 hours), depending on the maximum session duration setting for your
56
+ * role. However, if you assume a role using role chaining and provide a
57
+ * <code>DurationSeconds</code> parameter value greater than one hour, the operation
58
+ * fails.</p>
59
+ * </note>
60
+ * <p>
61
+ * <b>Permissions</b>
62
+ * </p>
63
+ * <p>The temporary security credentials created by <code>AssumeRoleWithSAML</code> can be
64
+ * used to make API calls to any Amazon Web Services service with the following exception: you cannot call
65
+ * the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
66
+ * operations.</p>
67
+ * <p>(Optional) You can pass inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policies</a> to
68
+ * this operation. You can pass a single JSON policy document to use as an inline session
69
+ * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as
70
+ * managed session policies. The plaintext that you use for both inline and managed session
71
+ * policies can't exceed 2,048 characters. Passing policies to this operation returns new
72
+ * temporary credentials. The resulting session's permissions are the intersection of the
73
+ * role's identity-based policy and the session policies. You can use the role's temporary
74
+ * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
75
+ * the role. You cannot use session policies to grant more permissions than those allowed
76
+ * by the identity-based policy of the role that is being assumed. For more information, see
77
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
78
+ * Policies</a> in the <i>IAM User Guide</i>.</p>
79
+ * <p>Calling <code>AssumeRoleWithSAML</code> does not require the use of Amazon Web Services security
80
+ * credentials. The identity of the caller is validated by using keys in the metadata document
81
+ * that is uploaded for the SAML provider entity for your identity provider. </p>
82
+ * <important>
83
+ * <p>Calling <code>AssumeRoleWithSAML</code> can result in an entry in your CloudTrail logs.
84
+ * The entry includes the value in the <code>NameID</code> element of the SAML assertion.
85
+ * We recommend that you use a <code>NameIDType</code> that is not associated with any
86
+ * personally identifiable information (PII). For example, you could instead use the
87
+ * persistent identifier
88
+ * (<code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code>).</p>
89
+ * </important>
90
+ * <p>
91
+ * <b>Tags</b>
92
+ * </p>
93
+ * <p>(Optional) You can configure your IdP to pass attributes into your SAML assertion as
94
+ * session tags. Each session tag consists of a key name and an associated value. For more
95
+ * information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the
96
+ * <i>IAM User Guide</i>.</p>
97
+ * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
98
+ * characters and the values can’t exceed 256 characters. For these and additional limits, see
99
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
100
+ * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
101
+ * <note>
102
+ * <p>An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,
103
+ * and session tags into a packed binary format that has a separate limit. Your request can
104
+ * fail for this limit even if your plaintext meets the other requirements. The
105
+ * <code>PackedPolicySize</code> response element indicates by percentage how close the
106
+ * policies and tags for your request are to the upper size limit.</p>
107
+ * </note>
108
+ * <p>You can pass a session tag with the same key as a tag that is attached to the role. When
109
+ * you do, session tags override the role's tags with the same key.</p>
110
+ * <p>An administrator must grant you the permissions necessary to pass session tags. The
111
+ * administrator can also create granular permissions to allow you to pass only specific
112
+ * session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags
113
+ * for Attribute-Based Access Control</a> in the
114
+ * <i>IAM User Guide</i>.</p>
115
+ * <p>You can set the session tags as transitive. Transitive tags persist during role
116
+ * chaining. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining">Chaining Roles
117
+ * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
118
+ * <p>
119
+ * <b>SAML Configuration</b>
120
+ * </p>
121
+ * <p>Before your application can call <code>AssumeRoleWithSAML</code>, you must configure
122
+ * your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you
123
+ * must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that
124
+ * represents your identity provider. You must also create an IAM role that specifies this
125
+ * SAML provider in its trust policy. </p>
126
+ * <p>For more information, see the following resources:</p>
127
+ * <ul>
128
+ * <li>
129
+ * <p>
130
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html">About
131
+ * SAML 2.0-based Federation</a> in the <i>IAM User Guide</i>.
132
+ * </p>
133
+ * </li>
134
+ * <li>
135
+ * <p>
136
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html">Creating SAML Identity Providers</a> in the
137
+ * <i>IAM User Guide</i>. </p>
138
+ * </li>
139
+ * <li>
140
+ * <p>
141
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html">Configuring
142
+ * a Relying Party and Claims</a> in the <i>IAM User Guide</i>.
143
+ * </p>
144
+ * </li>
145
+ * <li>
146
+ * <p>
147
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html">Creating a Role for SAML 2.0 Federation</a> in the
148
+ * <i>IAM User Guide</i>. </p>
149
+ * </li>
150
+ * </ul>
151
+ * @example
152
+ * Use a bare-bones client and the command you need to make an API call.
153
+ * ```javascript
154
+ * import { STSClient, AssumeRoleWithSAMLCommand } from "@aws-sdk/client-sts"; // ES Modules import
155
+ * // const { STSClient, AssumeRoleWithSAMLCommand } = require("@aws-sdk/client-sts"); // CommonJS import
156
+ * const client = new STSClient(config);
157
+ * const input = { // AssumeRoleWithSAMLRequest
158
+ * RoleArn: "STRING_VALUE", // required
159
+ * PrincipalArn: "STRING_VALUE", // required
160
+ * SAMLAssertion: "STRING_VALUE", // required
161
+ * PolicyArns: [ // policyDescriptorListType
162
+ * { // PolicyDescriptorType
163
+ * arn: "STRING_VALUE",
164
+ * },
165
+ * ],
166
+ * Policy: "STRING_VALUE",
167
+ * DurationSeconds: Number("int"),
168
+ * };
169
+ * const command = new AssumeRoleWithSAMLCommand(input);
170
+ * const response = await client.send(command);
171
+ * // { // AssumeRoleWithSAMLResponse
172
+ * // Credentials: { // Credentials
173
+ * // AccessKeyId: "STRING_VALUE", // required
174
+ * // SecretAccessKey: "STRING_VALUE", // required
175
+ * // SessionToken: "STRING_VALUE", // required
176
+ * // Expiration: new Date("TIMESTAMP"), // required
177
+ * // },
178
+ * // AssumedRoleUser: { // AssumedRoleUser
179
+ * // AssumedRoleId: "STRING_VALUE", // required
180
+ * // Arn: "STRING_VALUE", // required
181
+ * // },
182
+ * // PackedPolicySize: Number("int"),
183
+ * // Subject: "STRING_VALUE",
184
+ * // SubjectType: "STRING_VALUE",
185
+ * // Issuer: "STRING_VALUE",
186
+ * // Audience: "STRING_VALUE",
187
+ * // NameQualifier: "STRING_VALUE",
188
+ * // SourceIdentity: "STRING_VALUE",
189
+ * // };
190
+ *
191
+ * ```
192
+ *
193
+ * @param AssumeRoleWithSAMLCommandInput - {@link AssumeRoleWithSAMLCommandInput}
194
+ * @returns {@link AssumeRoleWithSAMLCommandOutput}
195
+ * @see {@link AssumeRoleWithSAMLCommandInput} for command's `input` shape.
196
+ * @see {@link AssumeRoleWithSAMLCommandOutput} for command's `response` shape.
197
+ * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
198
+ *
199
+ * @throws {@link ExpiredTokenException} (client fault)
200
+ * <p>The web identity token that was passed is expired or is not valid. Get a new identity
201
+ * token from the identity provider and then retry the request.</p>
202
+ *
203
+ * @throws {@link IDPRejectedClaimException} (client fault)
204
+ * <p>The identity provider (IdP) reported that authentication failed. This might be because
205
+ * the claim is invalid.</p>
206
+ * <p>If this error is returned for the <code>AssumeRoleWithWebIdentity</code> operation, it
207
+ * can also mean that the claim has expired or has been explicitly revoked. </p>
208
+ *
209
+ * @throws {@link InvalidIdentityTokenException} (client fault)
210
+ * <p>The web identity token that was passed could not be validated by Amazon Web Services. Get a new
211
+ * identity token from the identity provider and then retry the request.</p>
212
+ *
213
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
214
+ * <p>The request was rejected because the policy document was malformed. The error message
215
+ * describes the specific error.</p>
216
+ *
217
+ * @throws {@link PackedPolicyTooLargeException} (client fault)
218
+ * <p>The request was rejected because the total packed size of the session policies and
219
+ * session tags combined was too large. An Amazon Web Services conversion compresses the session policy
220
+ * document, session policy ARNs, and session tags into a packed binary format that has a
221
+ * separate limit. The error message indicates by percentage how close the policies and
222
+ * tags are to the upper size limit. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in
223
+ * the <i>IAM User Guide</i>.</p>
224
+ * <p>You could receive this error even though you meet other defined session policy and
225
+ * session tag limits. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length">IAM and STS Entity
226
+ * Character Limits</a> in the <i>IAM User Guide</i>.</p>
227
+ *
228
+ * @throws {@link RegionDisabledException} (client fault)
229
+ * <p>STS is not activated in the requested region for the account that is being asked to
230
+ * generate credentials. The account administrator must use the IAM console to activate STS
231
+ * in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
232
+ * Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>IAM User
233
+ * Guide</i>.</p>
234
+ *
235
+ * @throws {@link STSServiceException}
236
+ * <p>Base exception class for all service exceptions from STS service.</p>
237
+ *
238
+ * @example To assume a role using a SAML assertion
239
+ * ```javascript
240
+ * //
241
+ * const input = {
242
+ * "DurationSeconds": 3600,
243
+ * "PrincipalArn": "arn:aws:iam::123456789012:saml-provider/SAML-test",
244
+ * "RoleArn": "arn:aws:iam::123456789012:role/TestSaml",
245
+ * "SAMLAssertion": "VERYLONGENCODEDASSERTIONEXAMPLExzYW1sOkF1ZGllbmNlPmJsYW5rPC9zYW1sOkF1ZGllbmNlPjwvc2FtbDpBdWRpZW5jZVJlc3RyaWN0aW9uPjwvc2FtbDpDb25kaXRpb25zPjxzYW1sOlN1YmplY3Q+PHNhbWw6TmFtZUlEIEZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOm5hbWVpZC1mb3JtYXQ6dHJhbnNpZW50Ij5TYW1sRXhhbXBsZTwvc2FtbDpOYW1lSUQ+PHNhbWw6U3ViamVjdENvbmZpcm1hdGlvbiBNZXRob2Q9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpjbTpiZWFyZXIiPjxzYW1sOlN1YmplY3RDb25maXJtYXRpb25EYXRhIE5vdE9uT3JBZnRlcj0iMjAxOS0xMS0wMVQyMDoyNTowNS4xNDVaIiBSZWNpcGllbnQ9Imh0dHBzOi8vc2lnbmluLmF3cy5hbWF6b24uY29tL3NhbWwiLz48L3NhbWw6U3ViamVjdENvbmZpcm1hdGlvbj48L3NhbWw6U3ViamVjdD48c2FtbDpBdXRoblN0YXRlbWVudCBBdXRoPD94bWwgdmpSZXNwb25zZT4="
246
+ * };
247
+ * const command = new AssumeRoleWithSAMLCommand(input);
248
+ * const response = await client.send(command);
249
+ * /* response ==
250
+ * {
251
+ * "AssumedRoleUser": {
252
+ * "Arn": "arn:aws:sts::123456789012:assumed-role/TestSaml",
253
+ * "AssumedRoleId": "ARO456EXAMPLE789:TestSaml"
254
+ * },
255
+ * "Audience": "https://signin.aws.amazon.com/saml",
256
+ * "Credentials": {
257
+ * "AccessKeyId": "ASIAV3ZUEFP6EXAMPLE",
258
+ * "Expiration": "2019-11-01T20:26:47Z",
259
+ * "SecretAccessKey": "8P+SQvWIuLnKhh8d++jpw0nNmQRBZvNEXAMPLEKEY",
260
+ * "SessionToken": "IQoJb3JpZ2luX2VjEOz////////////////////wEXAMPLEtMSJHMEUCIDoKK3JH9uGQE1z0sINr5M4jk+Na8KHDcCYRVjJCZEvOAiEA3OvJGtw1EcViOleS2vhs8VdCKFJQWPQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA=="
261
+ * },
262
+ * "Issuer": "https://integ.example.com/idp/shibboleth",
263
+ * "NameQualifier": "SbdGOnUkh1i4+EXAMPLExL/jEvs=",
264
+ * "PackedPolicySize": 6,
265
+ * "Subject": "SamlExample",
266
+ * "SubjectType": "transient"
267
+ * }
268
+ * *\/
269
+ * // example id: to-assume-role-with-saml-14882749597814
270
+ * ```
271
+ *
272
+ */
273
+ export declare class AssumeRoleWithSAMLCommand extends $Command<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput, STSClientResolvedConfig> {
274
+ readonly input: AssumeRoleWithSAMLCommandInput;
275
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
276
+ /**
277
+ * @public
278
+ */
279
+ constructor(input: AssumeRoleWithSAMLCommandInput);
280
+ /**
281
+ * @internal
282
+ */
283
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput>;
284
+ /**
285
+ * @internal
286
+ */
287
+ private serialize;
288
+ /**
289
+ * @internal
290
+ */
291
+ private deserialize;
292
+ }