@aws-sdk/client-sts 3.54.1 → 3.54.2

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.
@@ -8,37 +8,611 @@ import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from ".
8
8
  import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "./commands/GetFederationTokenCommand";
9
9
  import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "./commands/GetSessionTokenCommand";
10
10
  import { STSClient } from "./STSClient";
11
-
11
+ /**
12
+ * <fullname>Security Token Service</fullname>
13
+ * <p>Security Token Service (STS) enables you to request temporary, limited-privilege
14
+ * credentials for Identity and Access Management (IAM) users or for users that you
15
+ * authenticate (federated users). This guide provides descriptions of the STS API. For
16
+ * more information about using this service, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html">Temporary Security Credentials</a>.</p>
17
+ */
12
18
  export declare class STS extends STSClient {
13
-
19
+ /**
20
+ * <p>Returns a set of temporary security credentials that you can use to access Amazon Web Services
21
+ * resources that you might not normally have access to. These temporary credentials consist
22
+ * of an access key ID, a secret access key, and a security token. Typically, you use
23
+ * <code>AssumeRole</code> within your account or for cross-account access. For a
24
+ * comparison of <code>AssumeRole</code> with other API operations that produce temporary
25
+ * credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
26
+ * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
27
+ * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
28
+ * <p>
29
+ * <b>Permissions</b>
30
+ * </p>
31
+ * <p>The temporary security credentials created by <code>AssumeRole</code> can be used to
32
+ * make API calls to any Amazon Web Services service with the following exception: You cannot call the
33
+ * Amazon Web Services STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
34
+ * operations.</p>
35
+ * <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
36
+ * this operation. You can pass a single JSON policy document to use as an inline session
37
+ * policy. You can also specify up to 10 managed policies to use as managed session policies.
38
+ * The plaintext that you use for both inline and managed session policies can't exceed 2,048
39
+ * characters. Passing policies to this operation returns new
40
+ * temporary credentials. The resulting session's permissions are the intersection of the
41
+ * role's identity-based policy and the session policies. You can use the role's temporary
42
+ * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
43
+ * the role. You cannot use session policies to grant more permissions than those allowed
44
+ * by the identity-based policy of the role that is being assumed. For more information, see
45
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
46
+ * Policies</a> in the <i>IAM User Guide</i>.</p>
47
+ * <p>When you create a role, you create two policies: A role trust policy that specifies
48
+ * <i>who</i> can assume the role and a permissions policy that specifies
49
+ * <i>what</i> can be done with the role. You specify the trusted principal
50
+ * who is allowed to assume the role in the role trust policy.</p>
51
+ * <p>To assume a role from a different account, your Amazon Web Services account must be trusted by the
52
+ * role. The trust relationship is defined in the role's trust policy when the role is
53
+ * created. That trust policy states which accounts are allowed to delegate that access to
54
+ * users in the account. </p>
55
+ * <p>A user who wants to access a role in a different account must also have permissions that
56
+ * are delegated from the user account administrator. The administrator must attach a policy
57
+ * that allows the user to call <code>AssumeRole</code> for the ARN of the role in the other
58
+ * account.</p>
59
+ * <p>To allow a user to assume a role in the same account, you can do either of the
60
+ * following:</p>
61
+ * <ul>
62
+ * <li>
63
+ * <p>Attach a policy to the user that allows the user to call <code>AssumeRole</code>
64
+ * (as long as the role's trust policy trusts the account).</p>
65
+ * </li>
66
+ * <li>
67
+ * <p>Add the user as a principal directly in the role's trust policy.</p>
68
+ * </li>
69
+ * </ul>
70
+ * <p>You can do either because the role’s trust policy acts as an IAM resource-based
71
+ * policy. When a resource-based policy grants access to a principal in the same account, no
72
+ * additional identity-based policy is required. For more information about trust policies and
73
+ * resource-based policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">IAM Policies</a> in the
74
+ * <i>IAM User Guide</i>.</p>
75
+ *
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
+ */
14
111
  assumeRole(args: AssumeRoleCommandInput, options?: __HttpHandlerOptions): Promise<AssumeRoleCommandOutput>;
15
112
  assumeRole(args: AssumeRoleCommandInput, cb: (err: any, data?: AssumeRoleCommandOutput) => void): void;
16
113
  assumeRole(args: AssumeRoleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AssumeRoleCommandOutput) => void): void;
17
-
114
+ /**
115
+ * <p>Returns a set of temporary security credentials for users who have been authenticated
116
+ * via a SAML authentication response. This operation provides a mechanism for tying an
117
+ * enterprise identity store or directory to role-based Amazon Web Services access without user-specific
118
+ * credentials or configuration. For a comparison of <code>AssumeRoleWithSAML</code> with the
119
+ * 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
120
+ * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
121
+ * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
122
+ * <p>The temporary security credentials returned by this operation consist of an access key
123
+ * ID, a secret access key, and a security token. Applications can use these temporary
124
+ * security credentials to sign calls to Amazon Web Services services.</p>
125
+ * <p>
126
+ * <b>Session Duration</b>
127
+ * </p>
128
+ * <p>By default, the temporary security credentials created by
129
+ * <code>AssumeRoleWithSAML</code> last for one hour. However, you can use the optional
130
+ * <code>DurationSeconds</code> parameter to specify the duration of your session. Your
131
+ * role session lasts for the duration that you specify, or until the time specified in the
132
+ * SAML authentication response's <code>SessionNotOnOrAfter</code> value, whichever is
133
+ * shorter. You can provide a <code>DurationSeconds</code> value from 900 seconds (15 minutes)
134
+ * up to the maximum session duration setting for the role. This setting can have a value from
135
+ * 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
136
+ * Maximum Session Duration Setting for a Role</a> in the
137
+ * <i>IAM User Guide</i>. The maximum session duration limit applies when
138
+ * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
139
+ * commands. However the limit does not apply when you use those operations to create a
140
+ * 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
141
+ * <i>IAM User Guide</i>.</p>
142
+ * <note>
143
+ * <p>
144
+ * <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
145
+ * session to a maximum of one hour. When you use the <code>AssumeRole</code> API operation
146
+ * to assume a role, you can specify the duration of your role session with the
147
+ * <code>DurationSeconds</code> parameter. You can specify a parameter value of up to
148
+ * 43200 seconds (12 hours), depending on the maximum session duration setting for your
149
+ * role. However, if you assume a role using role chaining and provide a
150
+ * <code>DurationSeconds</code> parameter value greater than one hour, the operation
151
+ * fails.</p>
152
+ * </note>
153
+ * <p>
154
+ * <b>Permissions</b>
155
+ * </p>
156
+ * <p>The temporary security credentials created by <code>AssumeRoleWithSAML</code> can be
157
+ * used to make API calls to any Amazon Web Services service with the following exception: you cannot call
158
+ * the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
159
+ * operations.</p>
160
+ * <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
161
+ * this operation. You can pass a single JSON policy document to use as an inline session
162
+ * policy. You can also specify up to 10 managed policies to use as managed session policies.
163
+ * The plaintext that you use for both inline and managed session policies can't exceed 2,048
164
+ * characters. Passing policies to this operation returns new
165
+ * temporary credentials. The resulting session's permissions are the intersection of the
166
+ * role's identity-based policy and the session policies. You can use the role's temporary
167
+ * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
168
+ * the role. You cannot use session policies to grant more permissions than those allowed
169
+ * by the identity-based policy of the role that is being assumed. For more information, see
170
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
171
+ * Policies</a> in the <i>IAM User Guide</i>.</p>
172
+ * <p>Calling <code>AssumeRoleWithSAML</code> does not require the use of Amazon Web Services security
173
+ * credentials. The identity of the caller is validated by using keys in the metadata document
174
+ * that is uploaded for the SAML provider entity for your identity provider. </p>
175
+ * <important>
176
+ * <p>Calling <code>AssumeRoleWithSAML</code> can result in an entry in your CloudTrail logs.
177
+ * The entry includes the value in the <code>NameID</code> element of the SAML assertion.
178
+ * We recommend that you use a <code>NameIDType</code> that is not associated with any
179
+ * personally identifiable information (PII). For example, you could instead use the
180
+ * persistent identifier
181
+ * (<code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code>).</p>
182
+ * </important>
183
+ * <p>
184
+ * <b>Tags</b>
185
+ * </p>
186
+ * <p>(Optional) You can configure your IdP to pass attributes into your SAML assertion as
187
+ * session tags. Each session tag consists of a key name and an associated value. For more
188
+ * 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
189
+ * <i>IAM User Guide</i>.</p>
190
+ * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
191
+ * characters and the values can’t exceed 256 characters. For these and additional limits, see
192
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
193
+ * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
194
+ *
195
+ * <note>
196
+ * <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
197
+ * packed binary format that has a separate limit. Your request can fail for this limit
198
+ * even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
199
+ * response element indicates by percentage how close the policies and tags for your
200
+ * request are to the upper size limit.
201
+ * </p>
202
+ * </note>
203
+ *
204
+ * <p>You can pass a session tag with the same key as a tag that is attached to the role. When
205
+ * you do, session tags override the role's tags with the same key.</p>
206
+ * <p>An administrator must grant you the permissions necessary to pass session tags. The
207
+ * administrator can also create granular permissions to allow you to pass only specific
208
+ * 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
209
+ * for Attribute-Based Access Control</a> in the
210
+ * <i>IAM User Guide</i>.</p>
211
+ * <p>You can set the session tags as transitive. Transitive tags persist during role
212
+ * 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
213
+ * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
214
+ * <p>
215
+ * <b>SAML Configuration</b>
216
+ * </p>
217
+ * <p>Before your application can call <code>AssumeRoleWithSAML</code>, you must configure
218
+ * your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you
219
+ * must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that
220
+ * represents your identity provider. You must also create an IAM role that specifies this
221
+ * SAML provider in its trust policy. </p>
222
+ * <p>For more information, see the following resources:</p>
223
+ * <ul>
224
+ * <li>
225
+ * <p>
226
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html">About
227
+ * SAML 2.0-based Federation</a> in the <i>IAM User Guide</i>.
228
+ * </p>
229
+ * </li>
230
+ * <li>
231
+ * <p>
232
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html">Creating SAML Identity Providers</a> in the
233
+ * <i>IAM User Guide</i>. </p>
234
+ * </li>
235
+ * <li>
236
+ * <p>
237
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html">Configuring
238
+ * a Relying Party and Claims</a> in the <i>IAM User Guide</i>.
239
+ * </p>
240
+ * </li>
241
+ * <li>
242
+ * <p>
243
+ * <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
244
+ * <i>IAM User Guide</i>. </p>
245
+ * </li>
246
+ * </ul>
247
+ */
18
248
  assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, options?: __HttpHandlerOptions): Promise<AssumeRoleWithSAMLCommandOutput>;
19
249
  assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, cb: (err: any, data?: AssumeRoleWithSAMLCommandOutput) => void): void;
20
250
  assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AssumeRoleWithSAMLCommandOutput) => void): void;
21
-
251
+ /**
252
+ * <p>Returns a set of temporary security credentials for users who have been authenticated in
253
+ * a mobile or web application with a web identity provider. Example providers include the
254
+ * OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID Connect-compatible
255
+ * identity provider such as Google or <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html">Amazon Cognito federated identities</a>.</p>
256
+ * <note>
257
+ * <p>For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the
258
+ * <a href="http://aws.amazon.com/sdkforios/">Amazon Web Services SDK for iOS Developer Guide</a> and the <a href="http://aws.amazon.com/sdkforandroid/">Amazon Web Services SDK for Android Developer Guide</a> to uniquely
259
+ * identify a user. You can also supply the user with a consistent identity throughout the
260
+ * lifetime of an application.</p>
261
+ * <p>To learn more about Amazon Cognito, see <a href="https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840">Amazon Cognito Overview</a> in
262
+ * <i>Amazon Web Services SDK for Android Developer Guide</i> and <a href="https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664">Amazon Cognito Overview</a> in the
263
+ * <i>Amazon Web Services SDK for iOS Developer Guide</i>.</p>
264
+ * </note>
265
+ * <p>Calling <code>AssumeRoleWithWebIdentity</code> does not require the use of Amazon Web Services
266
+ * security credentials. Therefore, you can distribute an application (for example, on mobile
267
+ * devices) that requests temporary security credentials without including long-term Amazon Web Services
268
+ * credentials in the application. You also don't need to deploy server-based proxy services
269
+ * that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by
270
+ * using a token from the web identity provider. For a comparison of
271
+ * <code>AssumeRoleWithWebIdentity</code> with the other API operations that produce
272
+ * temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
273
+ * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
274
+ * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
275
+ * <p>The temporary security credentials returned by this API consist of an access key ID, a
276
+ * secret access key, and a security token. Applications can use these temporary security
277
+ * credentials to sign calls to Amazon Web Services service API operations.</p>
278
+ * <p>
279
+ * <b>Session Duration</b>
280
+ * </p>
281
+ * <p>By default, the temporary security credentials created by
282
+ * <code>AssumeRoleWithWebIdentity</code> last for one hour. However, you can use the
283
+ * optional <code>DurationSeconds</code> parameter to specify the duration of your session.
284
+ * You can provide a value from 900 seconds (15 minutes) up to the maximum session duration
285
+ * setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how
286
+ * 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
287
+ * Maximum Session Duration Setting for a Role</a> in the
288
+ * <i>IAM User Guide</i>. The maximum session duration limit applies when
289
+ * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
290
+ * commands. However the limit does not apply when you use those operations to create a
291
+ * 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
292
+ * <i>IAM User Guide</i>. </p>
293
+ * <p>
294
+ * <b>Permissions</b>
295
+ * </p>
296
+ * <p>The temporary security credentials created by <code>AssumeRoleWithWebIdentity</code> can
297
+ * be used to make API calls to any Amazon Web Services service with the following exception: you cannot
298
+ * call the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
299
+ * operations.</p>
300
+ * <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
301
+ * this operation. You can pass a single JSON policy document to use as an inline session
302
+ * policy. You can also specify up to 10 managed policies to use as managed session policies.
303
+ * The plaintext that you use for both inline and managed session policies can't exceed 2,048
304
+ * characters. Passing policies to this operation returns new
305
+ * temporary credentials. The resulting session's permissions are the intersection of the
306
+ * role's identity-based policy and the session policies. You can use the role's temporary
307
+ * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
308
+ * the role. You cannot use session policies to grant more permissions than those allowed
309
+ * by the identity-based policy of the role that is being assumed. For more information, see
310
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
311
+ * Policies</a> in the <i>IAM User Guide</i>.</p>
312
+ * <p>
313
+ * <b>Tags</b>
314
+ * </p>
315
+ * <p>(Optional) You can configure your IdP to pass attributes into your web identity token as
316
+ * session tags. Each session tag consists of a key name and an associated value. For more
317
+ * 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
318
+ * <i>IAM User Guide</i>.</p>
319
+ * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
320
+ * characters and the values can’t exceed 256 characters. For these and additional limits, see
321
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
322
+ * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
323
+ *
324
+ * <note>
325
+ * <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
326
+ * packed binary format that has a separate limit. Your request can fail for this limit
327
+ * even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
328
+ * response element indicates by percentage how close the policies and tags for your
329
+ * request are to the upper size limit.
330
+ * </p>
331
+ * </note>
332
+ *
333
+ * <p>You can pass a session tag with the same key as a tag that is attached to the role. When
334
+ * you do, the session tag overrides the role tag with the same key.</p>
335
+ * <p>An administrator must grant you the permissions necessary to pass session tags. The
336
+ * administrator can also create granular permissions to allow you to pass only specific
337
+ * 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
338
+ * for Attribute-Based Access Control</a> in the
339
+ * <i>IAM User Guide</i>.</p>
340
+ * <p>You can set the session tags as transitive. Transitive tags persist during role
341
+ * 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
342
+ * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
343
+ * <p>
344
+ * <b>Identities</b>
345
+ * </p>
346
+ * <p>Before your application can call <code>AssumeRoleWithWebIdentity</code>, you must have
347
+ * an identity token from a supported identity provider and create a role that the application
348
+ * can assume. The role that your application assumes must trust the identity provider that is
349
+ * associated with the identity token. In other words, the identity provider must be specified
350
+ * in the role's trust policy. </p>
351
+ * <important>
352
+ * <p>Calling <code>AssumeRoleWithWebIdentity</code> can result in an entry in your
353
+ * CloudTrail logs. The entry includes the <a href="http://openid.net/specs/openid-connect-core-1_0.html#Claims">Subject</a> of
354
+ * the provided web identity token. We recommend that you avoid using any personally
355
+ * identifiable information (PII) in this field. For example, you could instead use a GUID
356
+ * or a pairwise identifier, as <a href="http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes">suggested
357
+ * in the OIDC specification</a>.</p>
358
+ * </important>
359
+ * <p>For more information about how to use web identity federation and the
360
+ * <code>AssumeRoleWithWebIdentity</code> API, see the following resources: </p>
361
+ * <ul>
362
+ * <li>
363
+ * <p>
364
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html">Using Web Identity Federation API Operations for Mobile Apps</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity">Federation Through a Web-based Identity Provider</a>. </p>
365
+ * </li>
366
+ * <li>
367
+ * <p>
368
+ * <a href="https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/"> Web Identity Federation Playground</a>. Walk through the process of
369
+ * authenticating through Login with Amazon, Facebook, or Google, getting temporary
370
+ * security credentials, and then using those credentials to make a request to Amazon Web Services.
371
+ * </p>
372
+ * </li>
373
+ * <li>
374
+ * <p>
375
+ * <a href="http://aws.amazon.com/sdkforios/">Amazon Web Services SDK for iOS Developer Guide</a> and <a href="http://aws.amazon.com/sdkforandroid/">Amazon Web Services SDK for Android Developer Guide</a>. These toolkits
376
+ * contain sample apps that show how to invoke the identity providers. The toolkits then
377
+ * show how to use the information from these providers to get and use temporary
378
+ * security credentials. </p>
379
+ * </li>
380
+ * <li>
381
+ * <p>
382
+ * <a href="http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications">Web Identity
383
+ * Federation with Mobile Applications</a>. This article discusses web identity
384
+ * federation and shows an example of how to use web identity federation to get access
385
+ * to content in Amazon S3. </p>
386
+ * </li>
387
+ * </ul>
388
+ */
22
389
  assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, options?: __HttpHandlerOptions): Promise<AssumeRoleWithWebIdentityCommandOutput>;
23
390
  assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, cb: (err: any, data?: AssumeRoleWithWebIdentityCommandOutput) => void): void;
24
391
  assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AssumeRoleWithWebIdentityCommandOutput) => void): void;
25
-
392
+ /**
393
+ * <p>Decodes additional information about the authorization status of a request from an
394
+ * encoded message returned in response to an Amazon Web Services request.</p>
395
+ * <p>For example, if a user is not authorized to perform an operation that he or she has
396
+ * requested, the request returns a <code>Client.UnauthorizedOperation</code> response (an
397
+ * HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can
398
+ * provide details about this authorization failure. </p>
399
+ * <note>
400
+ * <p>Only certain Amazon Web Services operations return an encoded authorization message. The
401
+ * documentation for an individual operation indicates whether that operation returns an
402
+ * encoded message in addition to returning an HTTP code.</p>
403
+ * </note>
404
+ * <p>The message is encoded because the details of the authorization status can contain
405
+ * privileged information that the user who requested the operation should not see. To decode
406
+ * an authorization status message, a user must be granted permissions through an IAM <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">policy</a> to
407
+ * request the <code>DecodeAuthorizationMessage</code>
408
+ * (<code>sts:DecodeAuthorizationMessage</code>) action. </p>
409
+ * <p>The decoded message includes the following type of information:</p>
410
+ * <ul>
411
+ * <li>
412
+ * <p>Whether the request was denied due to an explicit deny or due to the absence of an
413
+ * explicit allow. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow">Determining Whether a Request is Allowed or Denied</a> in the
414
+ * <i>IAM User Guide</i>. </p>
415
+ * </li>
416
+ * <li>
417
+ * <p>The principal who made the request.</p>
418
+ * </li>
419
+ * <li>
420
+ * <p>The requested action.</p>
421
+ * </li>
422
+ * <li>
423
+ * <p>The requested resource.</p>
424
+ * </li>
425
+ * <li>
426
+ * <p>The values of condition keys in the context of the user's request.</p>
427
+ * </li>
428
+ * </ul>
429
+ */
26
430
  decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, options?: __HttpHandlerOptions): Promise<DecodeAuthorizationMessageCommandOutput>;
27
431
  decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, cb: (err: any, data?: DecodeAuthorizationMessageCommandOutput) => void): void;
28
432
  decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DecodeAuthorizationMessageCommandOutput) => void): void;
29
-
433
+ /**
434
+ * <p>Returns the account identifier for the specified access key ID.</p>
435
+ * <p>Access keys consist of two parts: an access key ID (for example,
436
+ * <code>AKIAIOSFODNN7EXAMPLE</code>) and a secret access key (for example,
437
+ * <code>wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY</code>). For more information about
438
+ * access keys, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html">Managing Access Keys for IAM
439
+ * Users</a> in the <i>IAM User Guide</i>.</p>
440
+ * <p>When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services account
441
+ * to which the keys belong. Access key IDs beginning with <code>AKIA</code> are long-term
442
+ * credentials for an IAM user or the Amazon Web Services account root user. Access key IDs beginning with
443
+ * <code>ASIA</code> are temporary credentials that are created using STS operations. If
444
+ * the account in the response belongs to you, you can sign in as the root user and review
445
+ * your root user access keys. Then, you can pull a <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html">credentials report</a> to
446
+ * learn which IAM user owns the keys. To learn who requested the temporary credentials for
447
+ * an <code>ASIA</code> access key, view the STS events in your <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html">CloudTrail logs</a> in the
448
+ * <i>IAM User Guide</i>.</p>
449
+ * <p>This operation does not indicate the state of the access key. The key might be active,
450
+ * inactive, or deleted. Active keys might not have permissions to perform an operation.
451
+ * Providing a deleted access key might return an error that the key doesn't exist.</p>
452
+ */
30
453
  getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, options?: __HttpHandlerOptions): Promise<GetAccessKeyInfoCommandOutput>;
31
454
  getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, cb: (err: any, data?: GetAccessKeyInfoCommandOutput) => void): void;
32
455
  getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAccessKeyInfoCommandOutput) => void): void;
33
-
456
+ /**
457
+ * <p>Returns details about the IAM user or role whose credentials are used to call the
458
+ * operation.</p>
459
+ * <note>
460
+ * <p>No permissions are required to perform this operation. If an administrator adds a
461
+ * policy to your IAM user or role that explicitly denies access to the
462
+ * <code>sts:GetCallerIdentity</code> action, you can still perform this operation.
463
+ * Permissions are not required because the same information is returned when an IAM user
464
+ * or role is denied access. To view an example response, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa">I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice</a> in the
465
+ * <i>IAM User Guide</i>.</p>
466
+ * </note>
467
+ */
34
468
  getCallerIdentity(args: GetCallerIdentityCommandInput, options?: __HttpHandlerOptions): Promise<GetCallerIdentityCommandOutput>;
35
469
  getCallerIdentity(args: GetCallerIdentityCommandInput, cb: (err: any, data?: GetCallerIdentityCommandOutput) => void): void;
36
470
  getCallerIdentity(args: GetCallerIdentityCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetCallerIdentityCommandOutput) => void): void;
37
-
471
+ /**
472
+ * <p>Returns a set of temporary security credentials (consisting of an access key ID, a
473
+ * secret access key, and a security token) for a federated user. A typical use is in a proxy
474
+ * application that gets temporary security credentials on behalf of distributed applications
475
+ * inside a corporate network. You must call the <code>GetFederationToken</code> operation
476
+ * using the long-term security credentials of an IAM user. As a result, this call is
477
+ * appropriate in contexts where those credentials can be safely stored, usually in a
478
+ * server-based application. For a comparison of <code>GetFederationToken</code> with the
479
+ * 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
480
+ * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
481
+ * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
482
+ * <note>
483
+ * <p>You can create a mobile-based or browser-based app that can authenticate users using
484
+ * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID
485
+ * Connect-compatible identity provider. In this case, we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon Cognito</a> or
486
+ * <code>AssumeRoleWithWebIdentity</code>. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity">Federation Through a Web-based Identity Provider</a> in the
487
+ * <i>IAM User Guide</i>.</p>
488
+ * </note>
489
+ * <p>You can also call <code>GetFederationToken</code> using the security credentials of an
490
+ * Amazon Web Services account root user, but we do not recommend it. Instead, we recommend that you create
491
+ * an IAM user for the purpose of the proxy application. Then attach a policy to the IAM
492
+ * user that limits federated users to only the actions and resources that they need to
493
+ * access. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html">IAM Best Practices</a> in the
494
+ * <i>IAM User Guide</i>. </p>
495
+ * <p>
496
+ * <b>Session duration</b>
497
+ * </p>
498
+ * <p>The temporary credentials are valid for the specified duration, from 900 seconds (15
499
+ * minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is
500
+ * 43,200 seconds (12 hours). Temporary credentials obtained by using the Amazon Web Services account root
501
+ * user credentials have a maximum duration of 3,600 seconds (1 hour).</p>
502
+ * <p>
503
+ * <b>Permissions</b>
504
+ * </p>
505
+ * <p>You can use the temporary credentials created by <code>GetFederationToken</code> in any
506
+ * Amazon Web Services service except the following:</p>
507
+ * <ul>
508
+ * <li>
509
+ * <p>You cannot call any IAM operations using the CLI or the Amazon Web Services API. </p>
510
+ * </li>
511
+ * <li>
512
+ * <p>You cannot call any STS operations except <code>GetCallerIdentity</code>.</p>
513
+ * </li>
514
+ * </ul>
515
+ * <p>You must pass an inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policy</a> to
516
+ * this operation. You can pass a single JSON policy document to use as an inline session
517
+ * policy. You can also specify up to 10 managed policies to use as managed session policies.
518
+ * The plaintext that you use for both inline and managed session policies can't exceed 2,048
519
+ * characters.</p>
520
+ * <p>Though the session policy parameters are optional, if you do not pass a policy, then the
521
+ * resulting federated user session has no permissions. When you pass session policies, the
522
+ * session permissions are the intersection of the IAM user policies and the session
523
+ * policies that you pass. This gives you a way to further restrict the permissions for a
524
+ * federated user. You cannot use session policies to grant more permissions than those that
525
+ * are defined in the permissions policy of the IAM user. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
526
+ * Policies</a> in the <i>IAM User Guide</i>. For information about
527
+ * using <code>GetFederationToken</code> to create temporary security credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken">GetFederationToken—Federation Through a Custom Identity Broker</a>. </p>
528
+ * <p>You can use the credentials to access a resource that has a resource-based policy. If
529
+ * that policy specifically references the federated user session in the
530
+ * <code>Principal</code> element of the policy, the session has the permissions allowed by
531
+ * the policy. These permissions are granted in addition to the permissions granted by the
532
+ * session policies.</p>
533
+ * <p>
534
+ * <b>Tags</b>
535
+ * </p>
536
+ * <p>(Optional) You can pass tag key-value pairs to your session. These are called session
537
+ * 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
538
+ * <i>IAM User Guide</i>.</p>
539
+ * <note>
540
+ * <p>You can create a mobile-based or browser-based app that can authenticate users using
541
+ * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID
542
+ * Connect-compatible identity provider. In this case, we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon Cognito</a> or
543
+ * <code>AssumeRoleWithWebIdentity</code>. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity">Federation Through a Web-based Identity Provider</a> in the
544
+ * <i>IAM User Guide</i>.</p>
545
+ * </note>
546
+ * <p>An administrator must grant you the permissions necessary to pass session tags. The
547
+ * administrator can also create granular permissions to allow you to pass only specific
548
+ * 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
549
+ * for Attribute-Based Access Control</a> in the
550
+ * <i>IAM User Guide</i>.</p>
551
+ * <p>Tag key–value pairs are not case sensitive, but case is preserved. This means that you
552
+ * cannot have separate <code>Department</code> and <code>department</code> tag keys. Assume
553
+ * that the user that you are federating has the
554
+ * <code>Department</code>=<code>Marketing</code> tag and you pass the
555
+ * <code>department</code>=<code>engineering</code> session tag. <code>Department</code>
556
+ * and <code>department</code> are not saved as separate tags, and the session tag passed in
557
+ * the request takes precedence over the user tag.</p>
558
+ */
38
559
  getFederationToken(args: GetFederationTokenCommandInput, options?: __HttpHandlerOptions): Promise<GetFederationTokenCommandOutput>;
39
560
  getFederationToken(args: GetFederationTokenCommandInput, cb: (err: any, data?: GetFederationTokenCommandOutput) => void): void;
40
561
  getFederationToken(args: GetFederationTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetFederationTokenCommandOutput) => void): void;
41
-
562
+ /**
563
+ * <p>Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The
564
+ * credentials consist of an access key ID, a secret access key, and a security token.
565
+ * Typically, you use <code>GetSessionToken</code> if you want to use MFA to protect
566
+ * programmatic calls to specific Amazon Web Services API operations like Amazon EC2 <code>StopInstances</code>.
567
+ * MFA-enabled IAM users would need to call <code>GetSessionToken</code> and submit an MFA
568
+ * code that is associated with their MFA device. Using the temporary security credentials
569
+ * that are returned from the call, IAM users can then make programmatic calls to API
570
+ * operations that require MFA authentication. If you do not supply a correct MFA code, then
571
+ * the API returns an access denied error. For a comparison of <code>GetSessionToken</code>
572
+ * with the other API operations that produce temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting
573
+ * Temporary Security Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
574
+ * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
575
+ * <p>
576
+ * <b>Session Duration</b>
577
+ * </p>
578
+ * <p>The <code>GetSessionToken</code> operation must be called by using the long-term Amazon Web Services
579
+ * security credentials of the Amazon Web Services account root user or an IAM user. Credentials that are
580
+ * created by IAM users are valid for the duration that you specify. This duration can range
581
+ * from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default
582
+ * of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900
583
+ * seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour. </p>
584
+ * <p>
585
+ * <b>Permissions</b>
586
+ * </p>
587
+ * <p>The temporary security credentials created by <code>GetSessionToken</code> can be used
588
+ * to make API calls to any Amazon Web Services service with the following exceptions:</p>
589
+ * <ul>
590
+ * <li>
591
+ * <p>You cannot call any IAM API operations unless MFA authentication information is
592
+ * included in the request.</p>
593
+ * </li>
594
+ * <li>
595
+ * <p>You cannot call any STS API <i>except</i>
596
+ * <code>AssumeRole</code> or <code>GetCallerIdentity</code>.</p>
597
+ * </li>
598
+ * </ul>
599
+ * <note>
600
+ * <p>We recommend that you do not call <code>GetSessionToken</code> with Amazon Web Services account
601
+ * root user credentials. Instead, follow our <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users">best practices</a> by
602
+ * creating one or more IAM users, giving them the necessary permissions, and using IAM
603
+ * users for everyday interaction with Amazon Web Services. </p>
604
+ * </note>
605
+ * <p>The credentials that are returned by <code>GetSessionToken</code> are based on
606
+ * permissions associated with the user whose credentials were used to call the operation. If
607
+ * <code>GetSessionToken</code> is called using Amazon Web Services account root user credentials, the
608
+ * temporary credentials have root user permissions. Similarly, if
609
+ * <code>GetSessionToken</code> is called using the credentials of an IAM user, the
610
+ * temporary credentials have the same permissions as the IAM user. </p>
611
+ * <p>For more information about using <code>GetSessionToken</code> to create temporary
612
+ * credentials, go to <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken">Temporary
613
+ * Credentials for Users in Untrusted Environments</a> in the
614
+ * <i>IAM User Guide</i>. </p>
615
+ */
42
616
  getSessionToken(args: GetSessionTokenCommandInput, options?: __HttpHandlerOptions): Promise<GetSessionTokenCommandOutput>;
43
617
  getSessionToken(args: GetSessionTokenCommandInput, cb: (err: any, data?: GetSessionTokenCommandOutput) => void): void;
44
618
  getSessionToken(args: GetSessionTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSessionTokenCommandOutput) => void): void;