@aws-sdk/client-sts 3.33.0 → 3.36.1

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