@aws-sdk/client-sts 3.35.0 → 3.38.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 (135) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/STS.js +0 -8
  3. package/dist-cjs/STSClient.js +0 -13
  4. package/dist-cjs/commands/AssumeRoleCommand.js +0 -108
  5. package/dist-cjs/commands/AssumeRoleWithSAMLCommand.js +0 -156
  6. package/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js +0 -160
  7. package/dist-cjs/commands/DecodeAuthorizationMessageCommand.js +0 -60
  8. package/dist-cjs/commands/GetAccessKeyInfoCommand.js +0 -42
  9. package/dist-cjs/commands/GetCallerIdentityCommand.js +0 -34
  10. package/dist-cjs/commands/GetFederationTokenCommand.js +0 -163
  11. package/dist-cjs/commands/GetSessionTokenCommand.js +0 -76
  12. package/dist-cjs/commands/index.js +11 -0
  13. package/dist-cjs/defaultRoleAssumers.js +0 -17
  14. package/dist-cjs/defaultStsRoleAssumers.js +0 -21
  15. package/dist-cjs/endpoints.js +1 -2
  16. package/dist-cjs/index.js +3 -11
  17. package/dist-cjs/models/index.js +0 -1
  18. package/dist-cjs/models/models_0.js +0 -88
  19. package/dist-cjs/protocols/Aws_query.js +0 -3
  20. package/dist-cjs/runtimeConfig.browser.js +1 -6
  21. package/dist-cjs/runtimeConfig.js +3 -8
  22. package/dist-cjs/runtimeConfig.native.js +0 -4
  23. package/dist-cjs/runtimeConfig.shared.js +0 -4
  24. package/dist-es/STS.js +0 -1
  25. package/dist-es/STSClient.js +0 -1
  26. package/dist-es/commands/AssumeRoleCommand.js +0 -1
  27. package/dist-es/commands/AssumeRoleWithSAMLCommand.js +0 -1
  28. package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +0 -1
  29. package/dist-es/commands/DecodeAuthorizationMessageCommand.js +0 -1
  30. package/dist-es/commands/GetAccessKeyInfoCommand.js +0 -1
  31. package/dist-es/commands/GetCallerIdentityCommand.js +0 -1
  32. package/dist-es/commands/GetFederationTokenCommand.js +0 -1
  33. package/dist-es/commands/GetSessionTokenCommand.js +0 -1
  34. package/dist-es/commands/index.js +8 -0
  35. package/dist-es/defaultRoleAssumers.js +0 -1
  36. package/dist-es/defaultStsRoleAssumers.js +0 -1
  37. package/dist-es/endpoints.js +1 -2
  38. package/dist-es/index.js +3 -11
  39. package/dist-es/models/index.js +0 -1
  40. package/dist-es/models/models_0.js +0 -1
  41. package/dist-es/protocols/Aws_query.js +0 -1
  42. package/dist-es/runtimeConfig.browser.js +1 -2
  43. package/dist-es/runtimeConfig.js +3 -4
  44. package/dist-es/runtimeConfig.native.js +0 -1
  45. package/dist-es/runtimeConfig.shared.js +0 -1
  46. package/dist-types/commands/index.d.ts +8 -0
  47. package/dist-types/index.d.ts +3 -10
  48. package/dist-types/ts3.4/STS.d.ts +9 -630
  49. package/dist-types/ts3.4/STSClient.d.ts +24 -93
  50. package/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +2 -103
  51. package/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +2 -151
  52. package/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +2 -155
  53. package/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +2 -55
  54. package/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +2 -37
  55. package/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +2 -29
  56. package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +2 -158
  57. package/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +2 -71
  58. package/dist-types/ts3.4/commands/index.d.ts +8 -0
  59. package/dist-types/ts3.4/defaultRoleAssumers.d.ts +3 -14
  60. package/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +6 -25
  61. package/dist-types/ts3.4/index.d.ts +3 -10
  62. package/dist-types/ts3.4/models/models_0.d.ts +123 -948
  63. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  64. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  65. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  66. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  67. package/package.json +33 -30
  68. package/dist-cjs/STS.js.map +0 -1
  69. package/dist-cjs/STSClient.js.map +0 -1
  70. package/dist-cjs/commands/AssumeRoleCommand.js.map +0 -1
  71. package/dist-cjs/commands/AssumeRoleWithSAMLCommand.js.map +0 -1
  72. package/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js.map +0 -1
  73. package/dist-cjs/commands/DecodeAuthorizationMessageCommand.js.map +0 -1
  74. package/dist-cjs/commands/GetAccessKeyInfoCommand.js.map +0 -1
  75. package/dist-cjs/commands/GetCallerIdentityCommand.js.map +0 -1
  76. package/dist-cjs/commands/GetFederationTokenCommand.js.map +0 -1
  77. package/dist-cjs/commands/GetSessionTokenCommand.js.map +0 -1
  78. package/dist-cjs/defaultRoleAssumers.js.map +0 -1
  79. package/dist-cjs/defaultStsRoleAssumers.js.map +0 -1
  80. package/dist-cjs/endpoints.js.map +0 -1
  81. package/dist-cjs/index.js.map +0 -1
  82. package/dist-cjs/models/index.js.map +0 -1
  83. package/dist-cjs/models/models_0.js.map +0 -1
  84. package/dist-cjs/protocols/Aws_query.js.map +0 -1
  85. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  86. package/dist-cjs/runtimeConfig.js.map +0 -1
  87. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  88. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  89. package/dist-es/STS.js.map +0 -1
  90. package/dist-es/STSClient.js.map +0 -1
  91. package/dist-es/commands/AssumeRoleCommand.js.map +0 -1
  92. package/dist-es/commands/AssumeRoleWithSAMLCommand.js.map +0 -1
  93. package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js.map +0 -1
  94. package/dist-es/commands/DecodeAuthorizationMessageCommand.js.map +0 -1
  95. package/dist-es/commands/GetAccessKeyInfoCommand.js.map +0 -1
  96. package/dist-es/commands/GetCallerIdentityCommand.js.map +0 -1
  97. package/dist-es/commands/GetFederationTokenCommand.js.map +0 -1
  98. package/dist-es/commands/GetSessionTokenCommand.js.map +0 -1
  99. package/dist-es/defaultRoleAssumers.js.map +0 -1
  100. package/dist-es/defaultStsRoleAssumers.js.map +0 -1
  101. package/dist-es/endpoints.js.map +0 -1
  102. package/dist-es/index.js.map +0 -1
  103. package/dist-es/models/index.js.map +0 -1
  104. package/dist-es/models/models_0.js.map +0 -1
  105. package/dist-es/protocols/Aws_query.js.map +0 -1
  106. package/dist-es/runtimeConfig.browser.js.map +0 -1
  107. package/dist-es/runtimeConfig.js.map +0 -1
  108. package/dist-es/runtimeConfig.native.js.map +0 -1
  109. package/dist-es/runtimeConfig.shared.js.map +0 -1
  110. package/jest.config.js +0 -4
  111. package/src/STS.ts +0 -897
  112. package/src/STSClient.ts +0 -264
  113. package/src/commands/AssumeRoleCommand.ts +0 -177
  114. package/src/commands/AssumeRoleWithSAMLCommand.ts +0 -226
  115. package/src/commands/AssumeRoleWithWebIdentityCommand.ts +0 -233
  116. package/src/commands/DecodeAuthorizationMessageCommand.ts +0 -135
  117. package/src/commands/GetAccessKeyInfoCommand.ts +0 -114
  118. package/src/commands/GetCallerIdentityCommand.ts +0 -106
  119. package/src/commands/GetFederationTokenCommand.ts +0 -235
  120. package/src/commands/GetSessionTokenCommand.ts +0 -148
  121. package/src/defaultRoleAssumers.ts +0 -41
  122. package/src/defaultStsRoleAssumers.ts +0 -126
  123. package/src/endpoints.ts +0 -91
  124. package/src/index.ts +0 -12
  125. package/src/models/index.ts +0 -1
  126. package/src/models/models_0.ts +0 -1361
  127. package/src/protocols/Aws_query.ts +0 -1514
  128. package/src/runtimeConfig.browser.ts +0 -41
  129. package/src/runtimeConfig.native.ts +0 -17
  130. package/src/runtimeConfig.shared.ts +0 -17
  131. package/src/runtimeConfig.ts +0 -46
  132. package/test/defaultRoleAssumers.spec.ts +0 -149
  133. package/tsconfig.es.json +0 -10
  134. package/tsconfig.json +0 -33
  135. package/tsconfig.types.json +0 -9
package/src/STS.ts DELETED
@@ -1,897 +0,0 @@
1
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
-
3
- import { AssumeRoleCommand, AssumeRoleCommandInput, AssumeRoleCommandOutput } from "./commands/AssumeRoleCommand";
4
- import {
5
- AssumeRoleWithSAMLCommand,
6
- AssumeRoleWithSAMLCommandInput,
7
- AssumeRoleWithSAMLCommandOutput,
8
- } from "./commands/AssumeRoleWithSAMLCommand";
9
- import {
10
- AssumeRoleWithWebIdentityCommand,
11
- AssumeRoleWithWebIdentityCommandInput,
12
- AssumeRoleWithWebIdentityCommandOutput,
13
- } from "./commands/AssumeRoleWithWebIdentityCommand";
14
- import {
15
- DecodeAuthorizationMessageCommand,
16
- DecodeAuthorizationMessageCommandInput,
17
- DecodeAuthorizationMessageCommandOutput,
18
- } from "./commands/DecodeAuthorizationMessageCommand";
19
- import {
20
- GetAccessKeyInfoCommand,
21
- GetAccessKeyInfoCommandInput,
22
- GetAccessKeyInfoCommandOutput,
23
- } from "./commands/GetAccessKeyInfoCommand";
24
- import {
25
- GetCallerIdentityCommand,
26
- GetCallerIdentityCommandInput,
27
- GetCallerIdentityCommandOutput,
28
- } from "./commands/GetCallerIdentityCommand";
29
- import {
30
- GetFederationTokenCommand,
31
- GetFederationTokenCommandInput,
32
- GetFederationTokenCommandOutput,
33
- } from "./commands/GetFederationTokenCommand";
34
- import {
35
- GetSessionTokenCommand,
36
- GetSessionTokenCommandInput,
37
- GetSessionTokenCommandOutput,
38
- } from "./commands/GetSessionTokenCommand";
39
- import { STSClient } from "./STSClient";
40
-
41
- /**
42
- * <fullname>Security Token Service</fullname>
43
- * <p>Security Token Service (STS) enables you to request temporary, limited-privilege
44
- * credentials for Identity and Access Management (IAM) users or for users that you
45
- * authenticate (federated users). This guide provides descriptions of the STS API. For
46
- * 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>
47
- */
48
- export class STS extends STSClient {
49
- /**
50
- * <p>Returns a set of temporary security credentials that you can use to access Amazon Web Services
51
- * resources that you might not normally have access to. These temporary credentials
52
- * consist of an access key ID, a secret access key, and a security token. Typically, you
53
- * use <code>AssumeRole</code> within your account or for cross-account access. For a
54
- * comparison of <code>AssumeRole</code> with other API operations that produce temporary
55
- * credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
56
- * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing
57
- * the STS API operations</a> in the
58
- * <i>IAM User Guide</i>.</p>
59
- * <p>
60
- * <b>Permissions</b>
61
- * </p>
62
- * <p>The temporary security credentials created by <code>AssumeRole</code> can be used to
63
- * make API calls to any Amazon Web Services service with the following exception: You cannot call the
64
- * STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
65
- * operations.</p>
66
- * <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
67
- * this operation. You can pass a single JSON policy document to use as an inline session
68
- * policy. You can also specify up to 10 managed policies to use as managed session policies.
69
- * The plaintext that you use for both inline and managed session policies can't exceed 2,048
70
- * characters. Passing policies to this operation returns new
71
- * temporary credentials. The resulting session's permissions are the intersection of the
72
- * role's identity-based policy and the session policies. You can use the role's temporary
73
- * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
74
- * the role. You cannot use session policies to grant more permissions than those allowed
75
- * by the identity-based policy of the role that is being assumed. For more information, see
76
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
77
- * Policies</a> in the <i>IAM User Guide</i>.</p>
78
- * <p>To assume a role from a different account, your account must be trusted by the
79
- * role. The trust relationship is defined in the role's trust policy when the role is
80
- * created. That trust policy states which accounts are allowed to delegate that access to
81
- * users in the account. </p>
82
- * <p>A user who wants to access a role in a different account must also have permissions that
83
- * are delegated from the user account administrator. The administrator must attach a policy
84
- * that allows the user to call <code>AssumeRole</code> for the ARN of the role in the other
85
- * account. If the user is in the same account as the role, then you can do either of the
86
- * following:</p>
87
- * <ul>
88
- * <li>
89
- * <p>Attach a policy to the user (identical to the previous user in a different
90
- * account).</p>
91
- * </li>
92
- * <li>
93
- * <p>Add the user as a principal directly in the role's trust policy.</p>
94
- * </li>
95
- * </ul>
96
- * <p>In this case, the trust policy acts as an IAM resource-based policy. Users in the same
97
- * account as the role do not need explicit permission to assume the role. For more
98
- * information about trust policies and resource-based policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">IAM Policies</a> in
99
- * the <i>IAM User Guide</i>.</p>
100
- * <p>
101
- * <b>Tags</b>
102
- * </p>
103
- * <p>(Optional) You can pass tag key-value pairs to your session. These tags are called
104
- * 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
105
- * <i>IAM User Guide</i>.</p>
106
- * <p>An administrator must grant you the permissions necessary to pass session tags. The
107
- * administrator can also create granular permissions to allow you to pass only specific
108
- * 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
109
- * for Attribute-Based Access Control</a> in the
110
- * <i>IAM User Guide</i>.</p>
111
- * <p>You can set the session tags as transitive. Transitive tags persist during role
112
- * 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
113
- * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
114
- * <p>
115
- * <b>Using MFA with AssumeRole</b>
116
- * </p>
117
- * <p>(Optional) You can include multi-factor authentication (MFA) information when you call
118
- * <code>AssumeRole</code>. This is useful for cross-account scenarios to ensure that the
119
- * user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that
120
- * scenario, the trust policy of the role being assumed includes a condition that tests for
121
- * MFA authentication. If the caller does not include valid MFA information, the request to
122
- * assume the role is denied. The condition in a trust policy that tests for MFA
123
- * authentication might look like the following example.</p>
124
- * <p>
125
- * <code>"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}</code>
126
- * </p>
127
- * <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html">Configuring MFA-Protected API Access</a>
128
- * in the <i>IAM User Guide</i> guide.</p>
129
- * <p>To use MFA with <code>AssumeRole</code>, you pass values for the
130
- * <code>SerialNumber</code> and <code>TokenCode</code> parameters. The
131
- * <code>SerialNumber</code> value identifies the user's hardware or virtual MFA device.
132
- * The <code>TokenCode</code> is the time-based one-time password (TOTP) that the MFA device
133
- * produces. </p>
134
- */
135
- public assumeRole(args: AssumeRoleCommandInput, options?: __HttpHandlerOptions): Promise<AssumeRoleCommandOutput>;
136
- public assumeRole(args: AssumeRoleCommandInput, cb: (err: any, data?: AssumeRoleCommandOutput) => void): void;
137
- public assumeRole(
138
- args: AssumeRoleCommandInput,
139
- options: __HttpHandlerOptions,
140
- cb: (err: any, data?: AssumeRoleCommandOutput) => void
141
- ): void;
142
- public assumeRole(
143
- args: AssumeRoleCommandInput,
144
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AssumeRoleCommandOutput) => void),
145
- cb?: (err: any, data?: AssumeRoleCommandOutput) => void
146
- ): Promise<AssumeRoleCommandOutput> | void {
147
- const command = new AssumeRoleCommand(args);
148
- if (typeof optionsOrCb === "function") {
149
- this.send(command, optionsOrCb);
150
- } else if (typeof cb === "function") {
151
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
152
- this.send(command, optionsOrCb || {}, cb);
153
- } else {
154
- return this.send(command, optionsOrCb);
155
- }
156
- }
157
-
158
- /**
159
- * <p>Returns a set of temporary security credentials for users who have been authenticated
160
- * via a SAML authentication response. This operation provides a mechanism for tying an
161
- * enterprise identity store or directory to role-based Amazon Web Services access without user-specific
162
- * credentials or configuration. For a comparison of <code>AssumeRoleWithSAML</code> with the
163
- * 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
164
- * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
165
- * STS API operations</a> in the <i>IAM User Guide</i>.</p>
166
- * <p>The temporary security credentials returned by this operation consist of an access key
167
- * ID, a secret access key, and a security token. Applications can use these temporary
168
- * security credentials to sign calls to Amazon Web Services services.</p>
169
- * <p>
170
- * <b>Session Duration</b>
171
- * </p>
172
- * <p>By default, the temporary security credentials created by
173
- * <code>AssumeRoleWithSAML</code> last for one hour. However, you can use the optional
174
- * <code>DurationSeconds</code> parameter to specify the duration of your session. Your
175
- * role session lasts for the duration that you specify, or until the time specified in the
176
- * SAML authentication response's <code>SessionNotOnOrAfter</code> value, whichever is
177
- * shorter. You can provide a <code>DurationSeconds</code> value from 900 seconds (15 minutes)
178
- * up to the maximum session duration setting for the role. This setting can have a value from
179
- * 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
180
- * Maximum Session Duration Setting for a Role</a> in the
181
- * <i>IAM User Guide</i>. The maximum session duration limit applies when
182
- * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
183
- * commands. However the limit does not apply when you use those operations to create a
184
- * 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
185
- * <i>IAM User Guide</i>.</p>
186
- * <note>
187
- * <p>
188
- * <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
189
- * role session to a maximum of one hour. When you use the <code>AssumeRole</code> API
190
- * operation to assume a role, you can specify the duration of your role session with
191
- * the <code>DurationSeconds</code> parameter. You can specify a parameter value of up
192
- * to 43200 seconds (12 hours), depending on the maximum session duration setting for
193
- * your role. However, if you assume a role using role chaining and provide a
194
- * <code>DurationSeconds</code> parameter value greater than one hour, the
195
- * operation fails.</p>
196
- * </note>
197
- * <p>
198
- * <b>Permissions</b>
199
- * </p>
200
- * <p>The temporary security credentials created by <code>AssumeRoleWithSAML</code> can be
201
- * used to make API calls to any Amazon Web Services service with the following exception: you cannot call
202
- * the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
203
- * operations.</p>
204
- * <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
205
- * this operation. You can pass a single JSON policy document to use as an inline session
206
- * policy. You can also specify up to 10 managed policies to use as managed session policies.
207
- * The plaintext that you use for both inline and managed session policies can't exceed 2,048
208
- * characters. Passing policies to this operation returns new
209
- * temporary credentials. The resulting session's permissions are the intersection of the
210
- * role's identity-based policy and the session policies. You can use the role's temporary
211
- * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
212
- * the role. You cannot use session policies to grant more permissions than those allowed
213
- * by the identity-based policy of the role that is being assumed. For more information, see
214
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
215
- * Policies</a> in the <i>IAM User Guide</i>.</p>
216
- * <p>Calling <code>AssumeRoleWithSAML</code> does not require the use of Amazon Web Services security
217
- * credentials. The identity of the caller is validated by using keys in the metadata document
218
- * that is uploaded for the SAML provider entity for your identity provider. </p>
219
- * <important>
220
- * <p>Calling <code>AssumeRoleWithSAML</code> can result in an entry in your CloudTrail logs.
221
- * The entry includes the value in the <code>NameID</code> element of the SAML assertion.
222
- * We recommend that you use a <code>NameIDType</code> that is not associated with any
223
- * personally identifiable information (PII). For example, you could instead use the
224
- * persistent identifier
225
- * (<code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code>).</p>
226
- * </important>
227
- * <p>
228
- * <b>Tags</b>
229
- * </p>
230
- * <p>(Optional) You can configure your IdP to pass attributes into your SAML assertion as
231
- * session tags. Each session tag consists of a key name and an associated value. For more
232
- * 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
233
- * <i>IAM User Guide</i>.</p>
234
- * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
235
- * characters and the values can’t exceed 256 characters. For these and additional limits, see
236
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
237
- * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
238
- *
239
- * <note>
240
- * <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
241
- * packed binary format that has a separate limit. Your request can fail for this limit
242
- * even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
243
- * response element indicates by percentage how close the policies and tags for your
244
- * request are to the upper size limit.
245
- * </p>
246
- * </note>
247
- * <p>You can pass a session tag with the same key as a tag that is
248
- * attached to the role. When you do, session tags override the role's tags with the same
249
- * key.</p>
250
- * <p>An administrator must grant you the permissions necessary to pass session tags. The
251
- * administrator can also create granular permissions to allow you to pass only specific
252
- * 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
253
- * for Attribute-Based Access Control</a> in the
254
- * <i>IAM User Guide</i>.</p>
255
- * <p>You can set the session tags as transitive. Transitive tags persist during role
256
- * 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
257
- * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
258
- * <p>
259
- * <b>SAML Configuration</b>
260
- * </p>
261
- * <p>Before your application can call <code>AssumeRoleWithSAML</code>, you must configure
262
- * your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you
263
- * must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that
264
- * represents your identity provider. You must also create an IAM role that specifies this
265
- * SAML provider in its trust policy. </p>
266
- * <p>For more information, see the following resources:</p>
267
- * <ul>
268
- * <li>
269
- * <p>
270
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html">About
271
- * SAML 2.0-based Federation</a> in the <i>IAM User Guide</i>.
272
- * </p>
273
- * </li>
274
- * <li>
275
- * <p>
276
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html">Creating SAML Identity Providers</a> in the
277
- * <i>IAM User Guide</i>. </p>
278
- * </li>
279
- * <li>
280
- * <p>
281
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html">Configuring
282
- * a Relying Party and Claims</a> in the <i>IAM User Guide</i>.
283
- * </p>
284
- * </li>
285
- * <li>
286
- * <p>
287
- * <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
288
- * <i>IAM User Guide</i>. </p>
289
- * </li>
290
- * </ul>
291
- */
292
- public assumeRoleWithSAML(
293
- args: AssumeRoleWithSAMLCommandInput,
294
- options?: __HttpHandlerOptions
295
- ): Promise<AssumeRoleWithSAMLCommandOutput>;
296
- public assumeRoleWithSAML(
297
- args: AssumeRoleWithSAMLCommandInput,
298
- cb: (err: any, data?: AssumeRoleWithSAMLCommandOutput) => void
299
- ): void;
300
- public assumeRoleWithSAML(
301
- args: AssumeRoleWithSAMLCommandInput,
302
- options: __HttpHandlerOptions,
303
- cb: (err: any, data?: AssumeRoleWithSAMLCommandOutput) => void
304
- ): void;
305
- public assumeRoleWithSAML(
306
- args: AssumeRoleWithSAMLCommandInput,
307
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AssumeRoleWithSAMLCommandOutput) => void),
308
- cb?: (err: any, data?: AssumeRoleWithSAMLCommandOutput) => void
309
- ): Promise<AssumeRoleWithSAMLCommandOutput> | void {
310
- const command = new AssumeRoleWithSAMLCommand(args);
311
- if (typeof optionsOrCb === "function") {
312
- this.send(command, optionsOrCb);
313
- } else if (typeof cb === "function") {
314
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
315
- this.send(command, optionsOrCb || {}, cb);
316
- } else {
317
- return this.send(command, optionsOrCb);
318
- }
319
- }
320
-
321
- /**
322
- * <p>Returns a set of temporary security credentials for users who have been authenticated in
323
- * a mobile or web application with a web identity provider. Example providers include Amazon Cognito,
324
- * Login with Amazon, Facebook, Google, or any OpenID Connect-compatible identity
325
- * provider.</p>
326
- * <note>
327
- * <p>For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the
328
- * <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
329
- * identify a user. You can also supply the user with a consistent identity throughout the
330
- * lifetime of an application.</p>
331
- * <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
332
- * <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
333
- * <i>Amazon Web Services SDK for iOS Developer Guide</i>.</p>
334
- * </note>
335
- * <p>Calling <code>AssumeRoleWithWebIdentity</code> does not require the use of Amazon Web Services
336
- * security credentials. Therefore, you can distribute an application (for example, on mobile
337
- * devices) that requests temporary security credentials without including long-term Amazon Web Services
338
- * credentials in the application. You also don't need to deploy server-based proxy services
339
- * that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by
340
- * using a token from the web identity provider. For a comparison of
341
- * <code>AssumeRoleWithWebIdentity</code> with the other API operations that produce
342
- * temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
343
- * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
344
- * STS API operations</a> in the <i>IAM User Guide</i>.</p>
345
- * <p>The temporary security credentials returned by this API consist of an access key ID, a
346
- * secret access key, and a security token. Applications can use these temporary security
347
- * credentials to sign calls to Amazon Web Services service API operations.</p>
348
- * <p>
349
- * <b>Session Duration</b>
350
- * </p>
351
- * <p>By default, the temporary security credentials created by
352
- * <code>AssumeRoleWithWebIdentity</code> last for one hour. However, you can use the
353
- * optional <code>DurationSeconds</code> parameter to specify the duration of your session.
354
- * You can provide a value from 900 seconds (15 minutes) up to the maximum session duration
355
- * setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how
356
- * 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
357
- * Maximum Session Duration Setting for a Role</a> in the
358
- * <i>IAM User Guide</i>. The maximum session duration limit applies when
359
- * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
360
- * commands. However the limit does not apply when you use those operations to create a
361
- * 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
362
- * <i>IAM User Guide</i>. </p>
363
- * <p>
364
- * <b>Permissions</b>
365
- * </p>
366
- * <p>The temporary security credentials created by <code>AssumeRoleWithWebIdentity</code> can
367
- * be used to make API calls to any Amazon Web Services service with the following exception: you cannot
368
- * call the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
369
- * operations.</p>
370
- * <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
371
- * this operation. You can pass a single JSON policy document to use as an inline session
372
- * policy. You can also specify up to 10 managed policies to use as managed session policies.
373
- * The plaintext that you use for both inline and managed session policies can't exceed 2,048
374
- * characters. Passing policies to this operation returns new
375
- * temporary credentials. The resulting session's permissions are the intersection of the
376
- * role's identity-based policy and the session policies. You can use the role's temporary
377
- * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
378
- * the role. You cannot use session policies to grant more permissions than those allowed
379
- * by the identity-based policy of the role that is being assumed. For more information, see
380
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
381
- * Policies</a> in the <i>IAM User Guide</i>.</p>
382
- * <p>
383
- * <b>Tags</b>
384
- * </p>
385
- * <p>(Optional) You can configure your IdP to pass attributes into your web identity token as
386
- * session tags. Each session tag consists of a key name and an associated value. For more
387
- * 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
388
- * <i>IAM User Guide</i>.</p>
389
- * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
390
- * characters and the values can’t exceed 256 characters. For these and additional limits, see
391
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
392
- * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
393
- *
394
- * <note>
395
- * <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
396
- * packed binary format that has a separate limit. Your request can fail for this limit
397
- * even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
398
- * response element indicates by percentage how close the policies and tags for your
399
- * request are to the upper size limit.
400
- * </p>
401
- * </note>
402
- * <p>You can pass a session tag with the same key as a tag that is
403
- * attached to the role. When you do, the session tag overrides the role tag with the same
404
- * key.</p>
405
- * <p>An administrator must grant you the permissions necessary to pass session tags. The
406
- * administrator can also create granular permissions to allow you to pass only specific
407
- * 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
408
- * for Attribute-Based Access Control</a> in the
409
- * <i>IAM User Guide</i>.</p>
410
- * <p>You can set the session tags as transitive. Transitive tags persist during role
411
- * 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
412
- * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
413
- * <p>
414
- * <b>Identities</b>
415
- * </p>
416
- * <p>Before your application can call <code>AssumeRoleWithWebIdentity</code>, you must have
417
- * an identity token from a supported identity provider and create a role that the application
418
- * can assume. The role that your application assumes must trust the identity provider that is
419
- * associated with the identity token. In other words, the identity provider must be specified
420
- * in the role's trust policy. </p>
421
- * <important>
422
- * <p>Calling <code>AssumeRoleWithWebIdentity</code> can result in an entry in your
423
- * CloudTrail logs. The entry includes the <a href="http://openid.net/specs/openid-connect-core-1_0.html#Claims">Subject</a> of
424
- * the provided web identity token. We recommend that you avoid using any personally
425
- * identifiable information (PII) in this field. For example, you could instead use a GUID
426
- * or a pairwise identifier, as <a href="http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes">suggested
427
- * in the OIDC specification</a>.</p>
428
- * </important>
429
- * <p>For more information about how to use web identity federation and the
430
- * <code>AssumeRoleWithWebIdentity</code> API, see the following resources: </p>
431
- * <ul>
432
- * <li>
433
- * <p>
434
- * <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>
435
- * </li>
436
- * <li>
437
- * <p>
438
- * <a href="https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/"> Web Identity Federation Playground</a>. Walk through the process of
439
- * authenticating through Login with Amazon, Facebook, or Google, getting temporary
440
- * security credentials, and then using those credentials to make a request to Amazon Web Services.
441
- * </p>
442
- * </li>
443
- * <li>
444
- * <p>
445
- * <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
446
- * contain sample apps that show how to invoke the identity providers. The toolkits then
447
- * show how to use the information from these providers to get and use temporary
448
- * security credentials. </p>
449
- * </li>
450
- * <li>
451
- * <p>
452
- * <a href="http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications">Web Identity
453
- * Federation with Mobile Applications</a>. This article discusses web identity
454
- * federation and shows an example of how to use web identity federation to get access
455
- * to content in Amazon S3. </p>
456
- * </li>
457
- * </ul>
458
- */
459
- public assumeRoleWithWebIdentity(
460
- args: AssumeRoleWithWebIdentityCommandInput,
461
- options?: __HttpHandlerOptions
462
- ): Promise<AssumeRoleWithWebIdentityCommandOutput>;
463
- public assumeRoleWithWebIdentity(
464
- args: AssumeRoleWithWebIdentityCommandInput,
465
- cb: (err: any, data?: AssumeRoleWithWebIdentityCommandOutput) => void
466
- ): void;
467
- public assumeRoleWithWebIdentity(
468
- args: AssumeRoleWithWebIdentityCommandInput,
469
- options: __HttpHandlerOptions,
470
- cb: (err: any, data?: AssumeRoleWithWebIdentityCommandOutput) => void
471
- ): void;
472
- public assumeRoleWithWebIdentity(
473
- args: AssumeRoleWithWebIdentityCommandInput,
474
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AssumeRoleWithWebIdentityCommandOutput) => void),
475
- cb?: (err: any, data?: AssumeRoleWithWebIdentityCommandOutput) => void
476
- ): Promise<AssumeRoleWithWebIdentityCommandOutput> | void {
477
- const command = new AssumeRoleWithWebIdentityCommand(args);
478
- if (typeof optionsOrCb === "function") {
479
- this.send(command, optionsOrCb);
480
- } else if (typeof cb === "function") {
481
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
482
- this.send(command, optionsOrCb || {}, cb);
483
- } else {
484
- return this.send(command, optionsOrCb);
485
- }
486
- }
487
-
488
- /**
489
- * <p>Decodes additional information about the authorization status of a request from an
490
- * encoded message returned in response to an Amazon Web Services request.</p>
491
- * <p>For example, if a user is not authorized to perform an operation that he or she has
492
- * requested, the request returns a <code>Client.UnauthorizedOperation</code> response (an
493
- * HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can
494
- * provide details about this authorization failure. </p>
495
- * <note>
496
- * <p>Only certain Amazon Web Services operations return an encoded authorization message. The
497
- * documentation for an individual operation indicates whether that operation returns an
498
- * encoded message in addition to returning an HTTP code.</p>
499
- * </note>
500
- * <p>The message is encoded because the details of the authorization status can constitute
501
- * privileged information that the user who requested the operation should not see. To decode
502
- * an authorization status message, a user must be granted permissions via an IAM policy to
503
- * request the <code>DecodeAuthorizationMessage</code>
504
- * (<code>sts:DecodeAuthorizationMessage</code>) action. </p>
505
- * <p>The decoded message includes the following type of information:</p>
506
- * <ul>
507
- * <li>
508
- * <p>Whether the request was denied due to an explicit deny or due to the absence of an
509
- * 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
510
- * <i>IAM User Guide</i>. </p>
511
- * </li>
512
- * <li>
513
- * <p>The principal who made the request.</p>
514
- * </li>
515
- * <li>
516
- * <p>The requested action.</p>
517
- * </li>
518
- * <li>
519
- * <p>The requested resource.</p>
520
- * </li>
521
- * <li>
522
- * <p>The values of condition keys in the context of the user's request.</p>
523
- * </li>
524
- * </ul>
525
- */
526
- public decodeAuthorizationMessage(
527
- args: DecodeAuthorizationMessageCommandInput,
528
- options?: __HttpHandlerOptions
529
- ): Promise<DecodeAuthorizationMessageCommandOutput>;
530
- public decodeAuthorizationMessage(
531
- args: DecodeAuthorizationMessageCommandInput,
532
- cb: (err: any, data?: DecodeAuthorizationMessageCommandOutput) => void
533
- ): void;
534
- public decodeAuthorizationMessage(
535
- args: DecodeAuthorizationMessageCommandInput,
536
- options: __HttpHandlerOptions,
537
- cb: (err: any, data?: DecodeAuthorizationMessageCommandOutput) => void
538
- ): void;
539
- public decodeAuthorizationMessage(
540
- args: DecodeAuthorizationMessageCommandInput,
541
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DecodeAuthorizationMessageCommandOutput) => void),
542
- cb?: (err: any, data?: DecodeAuthorizationMessageCommandOutput) => void
543
- ): Promise<DecodeAuthorizationMessageCommandOutput> | void {
544
- const command = new DecodeAuthorizationMessageCommand(args);
545
- if (typeof optionsOrCb === "function") {
546
- this.send(command, optionsOrCb);
547
- } else if (typeof cb === "function") {
548
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
549
- this.send(command, optionsOrCb || {}, cb);
550
- } else {
551
- return this.send(command, optionsOrCb);
552
- }
553
- }
554
-
555
- /**
556
- * <p>Returns the account identifier for the specified access key ID.</p>
557
- * <p>Access keys consist of two parts: an access key ID (for example,
558
- * <code>AKIAIOSFODNN7EXAMPLE</code>) and a secret access key (for example,
559
- * <code>wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY</code>). For more information about
560
- * access keys, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html">Managing Access Keys for IAM
561
- * Users</a> in the <i>IAM User Guide</i>.</p>
562
- * <p>When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services
563
- * account to which the keys belong. Access key IDs beginning with <code>AKIA</code> are
564
- * long-term credentials for an IAM user or the Amazon Web Services account root user. Access key IDs
565
- * beginning with <code>ASIA</code> are temporary credentials that are created using STS
566
- * operations. If the account in the response belongs to you, you can sign in as the root
567
- * user and review 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 learn which IAM user owns the keys. To learn who
568
- * requested the temporary credentials for an <code>ASIA</code> access key, view the STS
569
- * events in your <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html">CloudTrail logs</a> in the
570
- * <i>IAM User Guide</i>.</p>
571
- * <p>This operation does not indicate the state of the access key. The key might be active,
572
- * inactive, or deleted. Active keys might not have permissions to perform an operation.
573
- * Providing a deleted access key might return an error that the key doesn't exist.</p>
574
- */
575
- public getAccessKeyInfo(
576
- args: GetAccessKeyInfoCommandInput,
577
- options?: __HttpHandlerOptions
578
- ): Promise<GetAccessKeyInfoCommandOutput>;
579
- public getAccessKeyInfo(
580
- args: GetAccessKeyInfoCommandInput,
581
- cb: (err: any, data?: GetAccessKeyInfoCommandOutput) => void
582
- ): void;
583
- public getAccessKeyInfo(
584
- args: GetAccessKeyInfoCommandInput,
585
- options: __HttpHandlerOptions,
586
- cb: (err: any, data?: GetAccessKeyInfoCommandOutput) => void
587
- ): void;
588
- public getAccessKeyInfo(
589
- args: GetAccessKeyInfoCommandInput,
590
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetAccessKeyInfoCommandOutput) => void),
591
- cb?: (err: any, data?: GetAccessKeyInfoCommandOutput) => void
592
- ): Promise<GetAccessKeyInfoCommandOutput> | void {
593
- const command = new GetAccessKeyInfoCommand(args);
594
- if (typeof optionsOrCb === "function") {
595
- this.send(command, optionsOrCb);
596
- } else if (typeof cb === "function") {
597
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
598
- this.send(command, optionsOrCb || {}, cb);
599
- } else {
600
- return this.send(command, optionsOrCb);
601
- }
602
- }
603
-
604
- /**
605
- * <p>Returns details about the IAM user or role whose credentials are used to call the
606
- * operation.</p>
607
- * <note>
608
- * <p>No permissions are required to perform this operation. If an administrator adds a
609
- * policy to your IAM user or role that explicitly denies access to the
610
- * <code>sts:GetCallerIdentity</code> action, you can still perform this operation.
611
- * Permissions are not required because the same information is returned when an IAM
612
- * user 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
613
- * <i>IAM User Guide</i>.</p>
614
- * </note>
615
- */
616
- public getCallerIdentity(
617
- args: GetCallerIdentityCommandInput,
618
- options?: __HttpHandlerOptions
619
- ): Promise<GetCallerIdentityCommandOutput>;
620
- public getCallerIdentity(
621
- args: GetCallerIdentityCommandInput,
622
- cb: (err: any, data?: GetCallerIdentityCommandOutput) => void
623
- ): void;
624
- public getCallerIdentity(
625
- args: GetCallerIdentityCommandInput,
626
- options: __HttpHandlerOptions,
627
- cb: (err: any, data?: GetCallerIdentityCommandOutput) => void
628
- ): void;
629
- public getCallerIdentity(
630
- args: GetCallerIdentityCommandInput,
631
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetCallerIdentityCommandOutput) => void),
632
- cb?: (err: any, data?: GetCallerIdentityCommandOutput) => void
633
- ): Promise<GetCallerIdentityCommandOutput> | void {
634
- const command = new GetCallerIdentityCommand(args);
635
- if (typeof optionsOrCb === "function") {
636
- this.send(command, optionsOrCb);
637
- } else if (typeof cb === "function") {
638
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
639
- this.send(command, optionsOrCb || {}, cb);
640
- } else {
641
- return this.send(command, optionsOrCb);
642
- }
643
- }
644
-
645
- /**
646
- * <p>Returns a set of temporary security credentials (consisting of an access key ID, a
647
- * secret access key, and a security token) for a federated user. A typical use is in a proxy
648
- * application that gets temporary security credentials on behalf of distributed applications
649
- * inside a corporate network. You must call the <code>GetFederationToken</code> operation
650
- * using the long-term security credentials of an IAM user. As a result, this call is
651
- * appropriate in contexts where those credentials can be safely stored, usually in a
652
- * server-based application. For a comparison of <code>GetFederationToken</code> with the
653
- * 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
654
- * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
655
- * STS API operations</a> in the <i>IAM User Guide</i>.</p>
656
- * <note>
657
- * <p>You can create a mobile-based or browser-based app that can authenticate users using
658
- * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID
659
- * Connect-compatible identity provider. In this case, we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon Cognito</a> or
660
- * <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
661
- * <i>IAM User Guide</i>.</p>
662
- * </note>
663
- * <p>You can also call <code>GetFederationToken</code> using the security credentials of an
664
- * Amazon Web Services account root user, but we do not recommend it. Instead, we recommend that you create
665
- * an IAM user for the purpose of the proxy application. Then attach a policy to the IAM
666
- * user that limits federated users to only the actions and resources that they need to
667
- * access. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html">IAM Best Practices</a> in the
668
- * <i>IAM User Guide</i>. </p>
669
- * <p>
670
- * <b>Session duration</b>
671
- * </p>
672
- * <p>The temporary credentials are valid for the specified duration, from 900 seconds (15
673
- * minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is
674
- * 43,200 seconds (12 hours). Temporary credentials that are obtained by using Amazon Web Services account
675
- * root user credentials have a maximum duration of 3,600 seconds (1 hour).</p>
676
- * <p>
677
- * <b>Permissions</b>
678
- * </p>
679
- * <p>You can use the temporary credentials created by <code>GetFederationToken</code> in any
680
- * Amazon Web Services service except the following:</p>
681
- * <ul>
682
- * <li>
683
- * <p>You cannot call any IAM operations using the CLI or the Amazon Web Services API. </p>
684
- * </li>
685
- * <li>
686
- * <p>You cannot call any STS operations except <code>GetCallerIdentity</code>.</p>
687
- * </li>
688
- * </ul>
689
- * <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
690
- * this operation. You can pass a single JSON policy document to use as an inline session
691
- * policy. You can also specify up to 10 managed policies to use as managed session policies.
692
- * The plaintext that you use for both inline and managed session policies can't exceed 2,048
693
- * characters.</p>
694
- * <p>Though the session policy parameters are optional, if you do not pass a policy, then the
695
- * resulting federated user session has no permissions. When you pass session policies, the
696
- * session permissions are the intersection of the IAM user policies and the session
697
- * policies that you pass. This gives you a way to further restrict the permissions for a
698
- * federated user. You cannot use session policies to grant more permissions than those that
699
- * 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
700
- * Policies</a> in the <i>IAM User Guide</i>. For information about
701
- * 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>
702
- * <p>You can use the credentials to access a resource that has a resource-based policy. If
703
- * that policy specifically references the federated user session in the
704
- * <code>Principal</code> element of the policy, the session has the permissions allowed by
705
- * the policy. These permissions are granted in addition to the permissions granted by the
706
- * session policies.</p>
707
- * <p>
708
- * <b>Tags</b>
709
- * </p>
710
- * <p>(Optional) You can pass tag key-value pairs to your session. These are called session
711
- * 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
712
- * <i>IAM User Guide</i>.</p>
713
- * <note>
714
- * <p>You can create a mobile-based or browser-based app that can authenticate users
715
- * using a web identity provider like Login with Amazon, Facebook, Google, or an OpenID
716
- * Connect-compatible identity provider. In this case, we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon Cognito</a> or
717
- * <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
718
- * <i>IAM User Guide</i>.</p>
719
- * </note>
720
- * <p>You can also call <code>GetFederationToken</code> using the security credentials of an
721
- * Amazon Web Services account root user, but we do not recommend it. Instead, we recommend that you
722
- * create an IAM user for the purpose of the proxy application. Then attach a policy to
723
- * the IAM user that limits federated users to only the actions and resources that they
724
- * need to access. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html">IAM Best Practices</a> in the
725
- * <i>IAM User Guide</i>. </p>
726
- * <p>
727
- * <b>Session duration</b>
728
- * </p>
729
- * <p>The temporary credentials are valid for the specified duration, from 900 seconds (15
730
- * minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is
731
- * 43,200 seconds (12 hours). Temporary credentials that are obtained by using Amazon Web Services
732
- * account root user credentials have a maximum duration of 3,600 seconds (1 hour).</p>
733
- * <p>
734
- * <b>Permissions</b>
735
- * </p>
736
- * <p>You can use the temporary credentials created by <code>GetFederationToken</code> in
737
- * any Amazon Web Services service except the following:</p>
738
- * <ul>
739
- * <li>
740
- * <p>You cannot call any IAM operations using the CLI or the Amazon Web Services API.
741
- * </p>
742
- * </li>
743
- * <li>
744
- * <p>You cannot call any STS operations except
745
- * <code>GetCallerIdentity</code>.</p>
746
- * </li>
747
- * </ul>
748
- * <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
749
- * this operation. You can pass a single JSON policy document to use as an inline session
750
- * policy. You can also specify up to 10 managed policies to use as managed session
751
- * policies. The plain text that you use for both inline and managed session policies can't
752
- * exceed 2,048 characters.</p>
753
- * <p>Though the session policy parameters are optional, if you do not pass a policy, then
754
- * the resulting federated user session has no permissions. When you pass session policies,
755
- * the session permissions are the intersection of the IAM user policies and the session
756
- * policies that you pass. This gives you a way to further restrict the permissions for a
757
- * federated user. You cannot use session policies to grant more permissions than those
758
- * that are defined in the permissions policy of the IAM user. For more information, see
759
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session Policies</a>
760
- * in the <i>IAM User Guide</i>. For information about using
761
- * <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>
762
- * <p>You can use the credentials to access a resource that has a resource-based policy. If
763
- * that policy specifically references the federated user session in the
764
- * <code>Principal</code> element of the policy, the session has the permissions
765
- * allowed by the policy. These permissions are granted in addition to the permissions
766
- * granted by the session policies.</p>
767
- * <p>
768
- * <b>Tags</b>
769
- * </p>
770
- * <p>(Optional) You can pass tag key-value pairs to your session. These are called session
771
- * 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
772
- * the <i>IAM User Guide</i>.</p>
773
- * <p>An administrator must grant you the permissions necessary to pass session tags. The
774
- * administrator can also create granular permissions to allow you to pass only specific
775
- * session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using
776
- * Tags for Attribute-Based Access Control</a> in the
777
- * <i>IAM User Guide</i>.</p>
778
- * <p>Tag key–value pairs are not case sensitive, but case is preserved. This means that you
779
- * cannot have separate <code>Department</code> and <code>department</code> tag keys.
780
- * Assume that the user that you are federating has the
781
- * <code>Department</code>=<code>Marketing</code> tag and you pass the
782
- * <code>department</code>=<code>engineering</code> session tag.
783
- * <code>Department</code> and <code>department</code> are not saved as separate tags,
784
- * and the session tag passed in the request takes precedence over the user tag.</p>
785
- */
786
- public getFederationToken(
787
- args: GetFederationTokenCommandInput,
788
- options?: __HttpHandlerOptions
789
- ): Promise<GetFederationTokenCommandOutput>;
790
- public getFederationToken(
791
- args: GetFederationTokenCommandInput,
792
- cb: (err: any, data?: GetFederationTokenCommandOutput) => void
793
- ): void;
794
- public getFederationToken(
795
- args: GetFederationTokenCommandInput,
796
- options: __HttpHandlerOptions,
797
- cb: (err: any, data?: GetFederationTokenCommandOutput) => void
798
- ): void;
799
- public getFederationToken(
800
- args: GetFederationTokenCommandInput,
801
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetFederationTokenCommandOutput) => void),
802
- cb?: (err: any, data?: GetFederationTokenCommandOutput) => void
803
- ): Promise<GetFederationTokenCommandOutput> | void {
804
- const command = new GetFederationTokenCommand(args);
805
- if (typeof optionsOrCb === "function") {
806
- this.send(command, optionsOrCb);
807
- } else if (typeof cb === "function") {
808
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
809
- this.send(command, optionsOrCb || {}, cb);
810
- } else {
811
- return this.send(command, optionsOrCb);
812
- }
813
- }
814
-
815
- /**
816
- * <p>Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The
817
- * credentials consist of an access key ID, a secret access key, and a security token.
818
- * Typically, you use <code>GetSessionToken</code> if you want to use MFA to protect
819
- * programmatic calls to specific Amazon Web Services API operations like Amazon EC2 <code>StopInstances</code>.
820
- * MFA-enabled IAM users would need to call <code>GetSessionToken</code> and submit an MFA
821
- * code that is associated with their MFA device. Using the temporary security credentials
822
- * that are returned from the call, IAM users can then make programmatic calls to API
823
- * operations that require MFA authentication. If you do not supply a correct MFA code, then
824
- * the API returns an access denied error. For a comparison of <code>GetSessionToken</code>
825
- * 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
826
- * Temporary Security Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
827
- * STS API operations</a> in the <i>IAM User Guide</i>.</p>
828
- * <p>
829
- * <b>Session Duration</b>
830
- * </p>
831
- * <p>The <code>GetSessionToken</code> operation must be called by using the long-term Amazon Web Services
832
- * security credentials of the Amazon Web Services account root user or an IAM user. Credentials that are
833
- * created by IAM users are valid for the duration that you specify. This duration can range
834
- * from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default
835
- * of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900
836
- * seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour. </p>
837
- * <p>
838
- * <b>Permissions</b>
839
- * </p>
840
- * <p>The temporary security credentials created by <code>GetSessionToken</code> can be used
841
- * to make API calls to any Amazon Web Services service with the following exceptions:</p>
842
- * <ul>
843
- * <li>
844
- * <p>You cannot call any IAM API operations unless MFA authentication information is
845
- * included in the request.</p>
846
- * </li>
847
- * <li>
848
- * <p>You cannot call any STS API <i>except</i>
849
- * <code>AssumeRole</code> or <code>GetCallerIdentity</code>.</p>
850
- * </li>
851
- * </ul>
852
- * <note>
853
- * <p>We recommend that you do not call <code>GetSessionToken</code> with Amazon Web Services account
854
- * 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
855
- * creating one or more IAM users, giving them the necessary permissions, and using IAM
856
- * users for everyday interaction with Amazon Web Services. </p>
857
- * </note>
858
- * <p>The credentials that are returned by <code>GetSessionToken</code> are based on
859
- * permissions associated with the user whose credentials were used to call the operation. If
860
- * <code>GetSessionToken</code> is called using Amazon Web Services account root user credentials, the
861
- * temporary credentials have root user permissions. Similarly, if
862
- * <code>GetSessionToken</code> is called using the credentials of an IAM user, the
863
- * temporary credentials have the same permissions as the IAM user. </p>
864
- * <p>For more information about using <code>GetSessionToken</code> to create temporary
865
- * credentials, go to <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken">Temporary
866
- * Credentials for Users in Untrusted Environments</a> in the
867
- * <i>IAM User Guide</i>. </p>
868
- */
869
- public getSessionToken(
870
- args: GetSessionTokenCommandInput,
871
- options?: __HttpHandlerOptions
872
- ): Promise<GetSessionTokenCommandOutput>;
873
- public getSessionToken(
874
- args: GetSessionTokenCommandInput,
875
- cb: (err: any, data?: GetSessionTokenCommandOutput) => void
876
- ): void;
877
- public getSessionToken(
878
- args: GetSessionTokenCommandInput,
879
- options: __HttpHandlerOptions,
880
- cb: (err: any, data?: GetSessionTokenCommandOutput) => void
881
- ): void;
882
- public getSessionToken(
883
- args: GetSessionTokenCommandInput,
884
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetSessionTokenCommandOutput) => void),
885
- cb?: (err: any, data?: GetSessionTokenCommandOutput) => void
886
- ): Promise<GetSessionTokenCommandOutput> | void {
887
- const command = new GetSessionTokenCommand(args);
888
- if (typeof optionsOrCb === "function") {
889
- this.send(command, optionsOrCb);
890
- } else if (typeof cb === "function") {
891
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
892
- this.send(command, optionsOrCb || {}, cb);
893
- } else {
894
- return this.send(command, optionsOrCb);
895
- }
896
- }
897
- }