@aws-sdk/client-sts 3.335.0 → 3.335.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/CHANGELOG.md +3735 -0
  2. package/dist-types/ts3.4/STS.d.ts +69 -141
  3. package/dist-types/ts3.4/STSClient.d.ts +173 -161
  4. package/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +261 -34
  5. package/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +292 -38
  6. package/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +301 -41
  7. package/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +125 -41
  8. package/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +86 -37
  9. package/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +124 -38
  10. package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +235 -38
  11. package/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +162 -37
  12. package/dist-types/ts3.4/commands/index.d.ts +8 -8
  13. package/dist-types/ts3.4/defaultRoleAssumers.d.ts +20 -22
  14. package/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +35 -23
  15. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +22 -34
  16. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +5 -8
  17. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -2
  18. package/dist-types/ts3.4/index.d.ts +6 -6
  19. package/dist-types/ts3.4/models/STSServiceException.d.ts +12 -7
  20. package/dist-types/ts3.4/models/index.d.ts +1 -1
  21. package/dist-types/ts3.4/models/models_0.d.ts +1110 -201
  22. package/dist-types/ts3.4/protocols/Aws_query.d.ts +74 -101
  23. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +43 -98
  24. package/dist-types/ts3.4/runtimeConfig.d.ts +43 -93
  25. package/dist-types/ts3.4/runtimeConfig.native.d.ts +42 -89
  26. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +18 -18
  27. package/package.json +2 -2
@@ -1,41 +1,301 @@
1
- import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
- import { Command as $Command } from "@aws-sdk/smithy-client";
3
- import {
4
- Handler,
5
- HttpHandlerOptions as __HttpHandlerOptions,
6
- MetadataBearer as __MetadataBearer,
7
- MiddlewareStack,
8
- } from "@aws-sdk/types";
9
- import {
10
- AssumeRoleWithWebIdentityRequest,
11
- AssumeRoleWithWebIdentityResponse,
12
- } from "../models/models_0";
13
- import {
14
- ServiceInputTypes,
15
- ServiceOutputTypes,
16
- STSClientResolvedConfig,
17
- } from "../STSClient";
18
- export interface AssumeRoleWithWebIdentityCommandInput
19
- extends AssumeRoleWithWebIdentityRequest {}
20
- export interface AssumeRoleWithWebIdentityCommandOutput
21
- extends AssumeRoleWithWebIdentityResponse,
22
- __MetadataBearer {}
23
- export declare class AssumeRoleWithWebIdentityCommand extends $Command<
24
- AssumeRoleWithWebIdentityCommandInput,
25
- AssumeRoleWithWebIdentityCommandOutput,
26
- STSClientResolvedConfig
27
- > {
28
- readonly input: AssumeRoleWithWebIdentityCommandInput;
29
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
30
- constructor(input: AssumeRoleWithWebIdentityCommandInput);
31
- resolveMiddleware(
32
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
33
- configuration: STSClientResolvedConfig,
34
- options?: __HttpHandlerOptions
35
- ): Handler<
36
- AssumeRoleWithWebIdentityCommandInput,
37
- AssumeRoleWithWebIdentityCommandOutput
38
- >;
39
- private serialize;
40
- private deserialize;
41
- }
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { AssumeRoleWithWebIdentityRequest, AssumeRoleWithWebIdentityResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
6
+ /**
7
+ * @public
8
+ *
9
+ * The input for {@link AssumeRoleWithWebIdentityCommand}.
10
+ */
11
+ export interface AssumeRoleWithWebIdentityCommandInput extends AssumeRoleWithWebIdentityRequest {
12
+ }
13
+ /**
14
+ * @public
15
+ *
16
+ * The output of {@link AssumeRoleWithWebIdentityCommand}.
17
+ */
18
+ export interface AssumeRoleWithWebIdentityCommandOutput extends AssumeRoleWithWebIdentityResponse, __MetadataBearer {
19
+ }
20
+ /**
21
+ * @public
22
+ * <p>Returns a set of temporary security credentials for users who have been authenticated in
23
+ * a mobile or web application with a web identity provider. Example providers include the
24
+ * OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID Connect-compatible
25
+ * identity provider such as Google or <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html">Amazon Cognito federated identities</a>.</p>
26
+ * <note>
27
+ * <p>For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the
28
+ * <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
29
+ * identify a user. You can also supply the user with a consistent identity throughout the
30
+ * lifetime of an application.</p>
31
+ * <p>To learn more about Amazon Cognito, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html">Amazon Cognito identity pools</a> in
32
+ * <i>Amazon Cognito Developer Guide</i>.</p>
33
+ * </note>
34
+ * <p>Calling <code>AssumeRoleWithWebIdentity</code> does not require the use of Amazon Web Services
35
+ * security credentials. Therefore, you can distribute an application (for example, on mobile
36
+ * devices) that requests temporary security credentials without including long-term Amazon Web Services
37
+ * credentials in the application. You also don't need to deploy server-based proxy services
38
+ * that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by
39
+ * using a token from the web identity provider. For a comparison of
40
+ * <code>AssumeRoleWithWebIdentity</code> with the other API operations that produce
41
+ * temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
42
+ * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
43
+ * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
44
+ * <p>The temporary security credentials returned by this API consist of an access key ID, a
45
+ * secret access key, and a security token. Applications can use these temporary security
46
+ * credentials to sign calls to Amazon Web Services service API operations.</p>
47
+ * <p>
48
+ * <b>Session Duration</b>
49
+ * </p>
50
+ * <p>By default, the temporary security credentials created by
51
+ * <code>AssumeRoleWithWebIdentity</code> last for one hour. However, you can use the
52
+ * optional <code>DurationSeconds</code> parameter to specify the duration of your session.
53
+ * You can provide a value from 900 seconds (15 minutes) up to the maximum session duration
54
+ * setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how
55
+ * 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
56
+ * Maximum Session Duration Setting for a Role</a> in the
57
+ * <i>IAM User Guide</i>. The maximum session duration limit applies when
58
+ * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
59
+ * commands. However the limit does not apply when you use those operations to create a
60
+ * 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
61
+ * <i>IAM User Guide</i>. </p>
62
+ * <p>
63
+ * <b>Permissions</b>
64
+ * </p>
65
+ * <p>The temporary security credentials created by <code>AssumeRoleWithWebIdentity</code> can
66
+ * be used to make API calls to any Amazon Web Services service with the following exception: you cannot
67
+ * call the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
68
+ * operations.</p>
69
+ * <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
70
+ * this operation. You can pass a single JSON policy document to use as an inline session
71
+ * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as
72
+ * managed session policies. The plaintext that you use for both inline and managed session
73
+ * policies can't exceed 2,048 characters. Passing policies to this operation returns new
74
+ * temporary credentials. The resulting session's permissions are the intersection of the
75
+ * role's identity-based policy and the session policies. You can use the role's temporary
76
+ * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
77
+ * the role. You cannot use session policies to grant more permissions than those allowed
78
+ * by the identity-based policy of the role that is being assumed. For more information, see
79
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
80
+ * Policies</a> in the <i>IAM User Guide</i>.</p>
81
+ * <p>
82
+ * <b>Tags</b>
83
+ * </p>
84
+ * <p>(Optional) You can configure your IdP to pass attributes into your web identity token as
85
+ * session tags. Each session tag consists of a key name and an associated value. For more
86
+ * 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
87
+ * <i>IAM User Guide</i>.</p>
88
+ * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
89
+ * characters and the values can’t exceed 256 characters. For these and additional limits, see
90
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
91
+ * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
92
+ * <note>
93
+ * <p>An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,
94
+ * and session tags into a packed binary format that has a separate limit. Your request can
95
+ * fail for this limit even if your plaintext meets the other requirements. The
96
+ * <code>PackedPolicySize</code> response element indicates by percentage how close the
97
+ * policies and tags for your request are to the upper size limit.</p>
98
+ * </note>
99
+ * <p>You can pass a session tag with the same key as a tag that is attached to the role. When
100
+ * you do, the session tag overrides the role tag with the same key.</p>
101
+ * <p>An administrator must grant you the permissions necessary to pass session tags. The
102
+ * administrator can also create granular permissions to allow you to pass only specific
103
+ * 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
104
+ * for Attribute-Based Access Control</a> in the
105
+ * <i>IAM User Guide</i>.</p>
106
+ * <p>You can set the session tags as transitive. Transitive tags persist during role
107
+ * 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
108
+ * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
109
+ * <p>
110
+ * <b>Identities</b>
111
+ * </p>
112
+ * <p>Before your application can call <code>AssumeRoleWithWebIdentity</code>, you must have
113
+ * an identity token from a supported identity provider and create a role that the application
114
+ * can assume. The role that your application assumes must trust the identity provider that is
115
+ * associated with the identity token. In other words, the identity provider must be specified
116
+ * in the role's trust policy. </p>
117
+ * <important>
118
+ * <p>Calling <code>AssumeRoleWithWebIdentity</code> can result in an entry in your
119
+ * CloudTrail logs. The entry includes the <a href="http://openid.net/specs/openid-connect-core-1_0.html#Claims">Subject</a> of
120
+ * the provided web identity token. We recommend that you avoid using any personally
121
+ * identifiable information (PII) in this field. For example, you could instead use a GUID
122
+ * or a pairwise identifier, as <a href="http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes">suggested
123
+ * in the OIDC specification</a>.</p>
124
+ * </important>
125
+ * <p>For more information about how to use web identity federation and the
126
+ * <code>AssumeRoleWithWebIdentity</code> API, see the following resources: </p>
127
+ * <ul>
128
+ * <li>
129
+ * <p>
130
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_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>
131
+ * </li>
132
+ * <li>
133
+ * <p>
134
+ * <a href="https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/"> Web Identity Federation Playground</a>. Walk through the process of
135
+ * authenticating through Login with Amazon, Facebook, or Google, getting temporary
136
+ * security credentials, and then using those credentials to make a request to Amazon Web Services.
137
+ * </p>
138
+ * </li>
139
+ * <li>
140
+ * <p>
141
+ * <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
142
+ * contain sample apps that show how to invoke the identity providers. The toolkits then
143
+ * show how to use the information from these providers to get and use temporary
144
+ * security credentials. </p>
145
+ * </li>
146
+ * <li>
147
+ * <p>
148
+ * <a href="http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications">Web Identity
149
+ * Federation with Mobile Applications</a>. This article discusses web identity
150
+ * federation and shows an example of how to use web identity federation to get access
151
+ * to content in Amazon S3. </p>
152
+ * </li>
153
+ * </ul>
154
+ * @example
155
+ * Use a bare-bones client and the command you need to make an API call.
156
+ * ```javascript
157
+ * import { STSClient, AssumeRoleWithWebIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import
158
+ * // const { STSClient, AssumeRoleWithWebIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import
159
+ * const client = new STSClient(config);
160
+ * const input = { // AssumeRoleWithWebIdentityRequest
161
+ * RoleArn: "STRING_VALUE", // required
162
+ * RoleSessionName: "STRING_VALUE", // required
163
+ * WebIdentityToken: "STRING_VALUE", // required
164
+ * ProviderId: "STRING_VALUE",
165
+ * PolicyArns: [ // policyDescriptorListType
166
+ * { // PolicyDescriptorType
167
+ * arn: "STRING_VALUE",
168
+ * },
169
+ * ],
170
+ * Policy: "STRING_VALUE",
171
+ * DurationSeconds: Number("int"),
172
+ * };
173
+ * const command = new AssumeRoleWithWebIdentityCommand(input);
174
+ * const response = await client.send(command);
175
+ * // { // AssumeRoleWithWebIdentityResponse
176
+ * // Credentials: { // Credentials
177
+ * // AccessKeyId: "STRING_VALUE", // required
178
+ * // SecretAccessKey: "STRING_VALUE", // required
179
+ * // SessionToken: "STRING_VALUE", // required
180
+ * // Expiration: new Date("TIMESTAMP"), // required
181
+ * // },
182
+ * // SubjectFromWebIdentityToken: "STRING_VALUE",
183
+ * // AssumedRoleUser: { // AssumedRoleUser
184
+ * // AssumedRoleId: "STRING_VALUE", // required
185
+ * // Arn: "STRING_VALUE", // required
186
+ * // },
187
+ * // PackedPolicySize: Number("int"),
188
+ * // Provider: "STRING_VALUE",
189
+ * // Audience: "STRING_VALUE",
190
+ * // SourceIdentity: "STRING_VALUE",
191
+ * // };
192
+ *
193
+ * ```
194
+ *
195
+ * @param AssumeRoleWithWebIdentityCommandInput - {@link AssumeRoleWithWebIdentityCommandInput}
196
+ * @returns {@link AssumeRoleWithWebIdentityCommandOutput}
197
+ * @see {@link AssumeRoleWithWebIdentityCommandInput} for command's `input` shape.
198
+ * @see {@link AssumeRoleWithWebIdentityCommandOutput} for command's `response` shape.
199
+ * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
200
+ *
201
+ * @throws {@link ExpiredTokenException} (client fault)
202
+ * <p>The web identity token that was passed is expired or is not valid. Get a new identity
203
+ * token from the identity provider and then retry the request.</p>
204
+ *
205
+ * @throws {@link IDPCommunicationErrorException} (client fault)
206
+ * <p>The request could not be fulfilled because the identity provider (IDP) that
207
+ * was asked to verify the incoming identity token could not be reached. This is often a
208
+ * transient error caused by network conditions. Retry the request a limited number of
209
+ * times so that you don't exceed the request rate. If the error persists, the
210
+ * identity provider might be down or not responding.</p>
211
+ *
212
+ * @throws {@link IDPRejectedClaimException} (client fault)
213
+ * <p>The identity provider (IdP) reported that authentication failed. This might be because
214
+ * the claim is invalid.</p>
215
+ * <p>If this error is returned for the <code>AssumeRoleWithWebIdentity</code> operation, it
216
+ * can also mean that the claim has expired or has been explicitly revoked. </p>
217
+ *
218
+ * @throws {@link InvalidIdentityTokenException} (client fault)
219
+ * <p>The web identity token that was passed could not be validated by Amazon Web Services. Get a new
220
+ * identity token from the identity provider and then retry the request.</p>
221
+ *
222
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
223
+ * <p>The request was rejected because the policy document was malformed. The error message
224
+ * describes the specific error.</p>
225
+ *
226
+ * @throws {@link PackedPolicyTooLargeException} (client fault)
227
+ * <p>The request was rejected because the total packed size of the session policies and
228
+ * session tags combined was too large. An Amazon Web Services conversion compresses the session policy
229
+ * document, session policy ARNs, and session tags into a packed binary format that has a
230
+ * separate limit. The error message indicates by percentage how close the policies and
231
+ * tags are to the upper size limit. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in
232
+ * the <i>IAM User Guide</i>.</p>
233
+ * <p>You could receive this error even though you meet other defined session policy and
234
+ * session tag limits. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length">IAM and STS Entity
235
+ * Character Limits</a> in the <i>IAM User Guide</i>.</p>
236
+ *
237
+ * @throws {@link RegionDisabledException} (client fault)
238
+ * <p>STS is not activated in the requested region for the account that is being asked to
239
+ * generate credentials. The account administrator must use the IAM console to activate STS
240
+ * in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
241
+ * Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>IAM User
242
+ * Guide</i>.</p>
243
+ *
244
+ * @throws {@link STSServiceException}
245
+ * <p>Base exception class for all service exceptions from STS service.</p>
246
+ *
247
+ * @example To assume a role as an OpenID Connect-federated user
248
+ * ```javascript
249
+ * //
250
+ * const input = {
251
+ * "DurationSeconds": 3600,
252
+ * "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
253
+ * "ProviderId": "www.amazon.com",
254
+ * "RoleArn": "arn:aws:iam::123456789012:role/FederatedWebIdentityRole",
255
+ * "RoleSessionName": "app1",
256
+ * "WebIdentityToken": "Atza%7CIQEBLjAsAhRFiXuWpUXuRvQ9PZL3GMFcYevydwIUFAHZwXZXXXXXXXXJnrulxKDHwy87oGKPznh0D6bEQZTSCzyoCtL_8S07pLpr0zMbn6w1lfVZKNTBdDansFBmtGnIsIapjI6xKR02Yc_2bQ8LZbUXSGm6Ry6_BG7PrtLZtj_dfCTj92xNGed-CrKqjG7nPBjNIL016GGvuS5gSvPRUxWES3VYfm1wl7WTI7jn-Pcb6M-buCgHhFOzTQxod27L9CqnOLio7N3gZAGpsp6n1-AJBOCJckcyXe2c6uD0srOJeZlKUm2eTDVMf8IehDVI0r1QOnTV6KzzAI3OY87Vd_cVMQ"
257
+ * };
258
+ * const command = new AssumeRoleWithWebIdentityCommand(input);
259
+ * const response = await client.send(command);
260
+ * /* response ==
261
+ * {
262
+ * "AssumedRoleUser": {
263
+ * "Arn": "arn:aws:sts::123456789012:assumed-role/FederatedWebIdentityRole/app1",
264
+ * "AssumedRoleId": "AROACLKWSDQRAOEXAMPLE:app1"
265
+ * },
266
+ * "Audience": "client.5498841531868486423.1548@apps.example.com",
267
+ * "Credentials": {
268
+ * "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
269
+ * "Expiration": "2014-10-24T23:00:23Z",
270
+ * "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
271
+ * "SessionToken": "AQoDYXdzEE0a8ANXXXXXXXXNO1ewxE5TijQyp+IEXAMPLE"
272
+ * },
273
+ * "PackedPolicySize": 123,
274
+ * "Provider": "www.amazon.com",
275
+ * "SubjectFromWebIdentityToken": "amzn1.account.AF6RHO7KZU5XRVQJGXK6HEXAMPLE"
276
+ * }
277
+ * *\/
278
+ * // example id: to-assume-a-role-as-an-openid-connect-federated-user-1480533445696
279
+ * ```
280
+ *
281
+ */
282
+ export declare class AssumeRoleWithWebIdentityCommand extends $Command<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput, STSClientResolvedConfig> {
283
+ readonly input: AssumeRoleWithWebIdentityCommandInput;
284
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
285
+ /**
286
+ * @public
287
+ */
288
+ constructor(input: AssumeRoleWithWebIdentityCommandInput);
289
+ /**
290
+ * @internal
291
+ */
292
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput>;
293
+ /**
294
+ * @internal
295
+ */
296
+ private serialize;
297
+ /**
298
+ * @internal
299
+ */
300
+ private deserialize;
301
+ }
@@ -1,41 +1,125 @@
1
- import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
- import { Command as $Command } from "@aws-sdk/smithy-client";
3
- import {
4
- Handler,
5
- HttpHandlerOptions as __HttpHandlerOptions,
6
- MetadataBearer as __MetadataBearer,
7
- MiddlewareStack,
8
- } from "@aws-sdk/types";
9
- import {
10
- DecodeAuthorizationMessageRequest,
11
- DecodeAuthorizationMessageResponse,
12
- } from "../models/models_0";
13
- import {
14
- ServiceInputTypes,
15
- ServiceOutputTypes,
16
- STSClientResolvedConfig,
17
- } from "../STSClient";
18
- export interface DecodeAuthorizationMessageCommandInput
19
- extends DecodeAuthorizationMessageRequest {}
20
- export interface DecodeAuthorizationMessageCommandOutput
21
- extends DecodeAuthorizationMessageResponse,
22
- __MetadataBearer {}
23
- export declare class DecodeAuthorizationMessageCommand extends $Command<
24
- DecodeAuthorizationMessageCommandInput,
25
- DecodeAuthorizationMessageCommandOutput,
26
- STSClientResolvedConfig
27
- > {
28
- readonly input: DecodeAuthorizationMessageCommandInput;
29
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
30
- constructor(input: DecodeAuthorizationMessageCommandInput);
31
- resolveMiddleware(
32
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
33
- configuration: STSClientResolvedConfig,
34
- options?: __HttpHandlerOptions
35
- ): Handler<
36
- DecodeAuthorizationMessageCommandInput,
37
- DecodeAuthorizationMessageCommandOutput
38
- >;
39
- private serialize;
40
- private deserialize;
41
- }
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { DecodeAuthorizationMessageRequest, DecodeAuthorizationMessageResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
6
+ /**
7
+ * @public
8
+ *
9
+ * The input for {@link DecodeAuthorizationMessageCommand}.
10
+ */
11
+ export interface DecodeAuthorizationMessageCommandInput extends DecodeAuthorizationMessageRequest {
12
+ }
13
+ /**
14
+ * @public
15
+ *
16
+ * The output of {@link DecodeAuthorizationMessageCommand}.
17
+ */
18
+ export interface DecodeAuthorizationMessageCommandOutput extends DecodeAuthorizationMessageResponse, __MetadataBearer {
19
+ }
20
+ /**
21
+ * @public
22
+ * <p>Decodes additional information about the authorization status of a request from an
23
+ * encoded message returned in response to an Amazon Web Services request.</p>
24
+ * <p>For example, if a user is not authorized to perform an operation that he or she has
25
+ * requested, the request returns a <code>Client.UnauthorizedOperation</code> response (an
26
+ * HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can
27
+ * provide details about this authorization failure. </p>
28
+ * <note>
29
+ * <p>Only certain Amazon Web Services operations return an encoded authorization message. The
30
+ * documentation for an individual operation indicates whether that operation returns an
31
+ * encoded message in addition to returning an HTTP code.</p>
32
+ * </note>
33
+ * <p>The message is encoded because the details of the authorization status can contain
34
+ * privileged information that the user who requested the operation should not see. To decode
35
+ * an authorization status message, a user must be granted permissions through an IAM <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">policy</a> to
36
+ * request the <code>DecodeAuthorizationMessage</code>
37
+ * (<code>sts:DecodeAuthorizationMessage</code>) action. </p>
38
+ * <p>The decoded message includes the following type of information:</p>
39
+ * <ul>
40
+ * <li>
41
+ * <p>Whether the request was denied due to an explicit deny or due to the absence of an
42
+ * 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
43
+ * <i>IAM User Guide</i>. </p>
44
+ * </li>
45
+ * <li>
46
+ * <p>The principal who made the request.</p>
47
+ * </li>
48
+ * <li>
49
+ * <p>The requested action.</p>
50
+ * </li>
51
+ * <li>
52
+ * <p>The requested resource.</p>
53
+ * </li>
54
+ * <li>
55
+ * <p>The values of condition keys in the context of the user's request.</p>
56
+ * </li>
57
+ * </ul>
58
+ * @example
59
+ * Use a bare-bones client and the command you need to make an API call.
60
+ * ```javascript
61
+ * import { STSClient, DecodeAuthorizationMessageCommand } from "@aws-sdk/client-sts"; // ES Modules import
62
+ * // const { STSClient, DecodeAuthorizationMessageCommand } = require("@aws-sdk/client-sts"); // CommonJS import
63
+ * const client = new STSClient(config);
64
+ * const input = { // DecodeAuthorizationMessageRequest
65
+ * EncodedMessage: "STRING_VALUE", // required
66
+ * };
67
+ * const command = new DecodeAuthorizationMessageCommand(input);
68
+ * const response = await client.send(command);
69
+ * // { // DecodeAuthorizationMessageResponse
70
+ * // DecodedMessage: "STRING_VALUE",
71
+ * // };
72
+ *
73
+ * ```
74
+ *
75
+ * @param DecodeAuthorizationMessageCommandInput - {@link DecodeAuthorizationMessageCommandInput}
76
+ * @returns {@link DecodeAuthorizationMessageCommandOutput}
77
+ * @see {@link DecodeAuthorizationMessageCommandInput} for command's `input` shape.
78
+ * @see {@link DecodeAuthorizationMessageCommandOutput} for command's `response` shape.
79
+ * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
80
+ *
81
+ * @throws {@link InvalidAuthorizationMessageException} (client fault)
82
+ * <p>The error returned if the message passed to <code>DecodeAuthorizationMessage</code>
83
+ * was invalid. This can happen if the token contains invalid characters, such as
84
+ * linebreaks. </p>
85
+ *
86
+ * @throws {@link STSServiceException}
87
+ * <p>Base exception class for all service exceptions from STS service.</p>
88
+ *
89
+ * @example To decode information about an authorization status of a request
90
+ * ```javascript
91
+ * //
92
+ * const input = {
93
+ * "EncodedMessage": "<encoded-message>"
94
+ * };
95
+ * const command = new DecodeAuthorizationMessageCommand(input);
96
+ * const response = await client.send(command);
97
+ * /* response ==
98
+ * {
99
+ * "DecodedMessage": "{\"allowed\": \"false\",\"explicitDeny\": \"false\",\"matchedStatements\": \"\",\"failures\": \"\",\"context\": {\"principal\": {\"id\": \"AIDACKCEVSQ6C2EXAMPLE\",\"name\": \"Bob\",\"arn\": \"arn:aws:iam::123456789012:user/Bob\"},\"action\": \"ec2:StopInstances\",\"resource\": \"arn:aws:ec2:us-east-1:123456789012:instance/i-dd01c9bd\",\"conditions\": [{\"item\": {\"key\": \"ec2:Tenancy\",\"values\": [\"default\"]},{\"item\": {\"key\": \"ec2:ResourceTag/elasticbeanstalk:environment-name\",\"values\": [\"Default-Environment\"]}},(Additional items ...)]}}"
100
+ * }
101
+ * *\/
102
+ * // example id: to-decode-information-about-an-authorization-status-of-a-request-1480533854499
103
+ * ```
104
+ *
105
+ */
106
+ export declare class DecodeAuthorizationMessageCommand extends $Command<DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput, STSClientResolvedConfig> {
107
+ readonly input: DecodeAuthorizationMessageCommandInput;
108
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
109
+ /**
110
+ * @public
111
+ */
112
+ constructor(input: DecodeAuthorizationMessageCommandInput);
113
+ /**
114
+ * @internal
115
+ */
116
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput>;
117
+ /**
118
+ * @internal
119
+ */
120
+ private serialize;
121
+ /**
122
+ * @internal
123
+ */
124
+ private deserialize;
125
+ }
@@ -1,37 +1,86 @@
1
- import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
- import { Command as $Command } from "@aws-sdk/smithy-client";
3
- import {
4
- Handler,
5
- HttpHandlerOptions as __HttpHandlerOptions,
6
- MetadataBearer as __MetadataBearer,
7
- MiddlewareStack,
8
- } from "@aws-sdk/types";
9
- import {
10
- GetAccessKeyInfoRequest,
11
- GetAccessKeyInfoResponse,
12
- } from "../models/models_0";
13
- import {
14
- ServiceInputTypes,
15
- ServiceOutputTypes,
16
- STSClientResolvedConfig,
17
- } from "../STSClient";
18
- export interface GetAccessKeyInfoCommandInput extends GetAccessKeyInfoRequest {}
19
- export interface GetAccessKeyInfoCommandOutput
20
- extends GetAccessKeyInfoResponse,
21
- __MetadataBearer {}
22
- export declare class GetAccessKeyInfoCommand extends $Command<
23
- GetAccessKeyInfoCommandInput,
24
- GetAccessKeyInfoCommandOutput,
25
- STSClientResolvedConfig
26
- > {
27
- readonly input: GetAccessKeyInfoCommandInput;
28
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
29
- constructor(input: GetAccessKeyInfoCommandInput);
30
- resolveMiddleware(
31
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
32
- configuration: STSClientResolvedConfig,
33
- options?: __HttpHandlerOptions
34
- ): Handler<GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput>;
35
- private serialize;
36
- private deserialize;
37
- }
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { GetAccessKeyInfoRequest, GetAccessKeyInfoResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
6
+ /**
7
+ * @public
8
+ *
9
+ * The input for {@link GetAccessKeyInfoCommand}.
10
+ */
11
+ export interface GetAccessKeyInfoCommandInput extends GetAccessKeyInfoRequest {
12
+ }
13
+ /**
14
+ * @public
15
+ *
16
+ * The output of {@link GetAccessKeyInfoCommand}.
17
+ */
18
+ export interface GetAccessKeyInfoCommandOutput extends GetAccessKeyInfoResponse, __MetadataBearer {
19
+ }
20
+ /**
21
+ * @public
22
+ * <p>Returns the account identifier for the specified access key ID.</p>
23
+ * <p>Access keys consist of two parts: an access key ID (for example,
24
+ * <code>AKIAIOSFODNN7EXAMPLE</code>) and a secret access key (for example,
25
+ * <code>wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY</code>). For more information about
26
+ * access keys, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html">Managing Access Keys for IAM
27
+ * Users</a> in the <i>IAM User Guide</i>.</p>
28
+ * <p>When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services account
29
+ * to which the keys belong. Access key IDs beginning with <code>AKIA</code> are long-term
30
+ * credentials for an IAM user or the Amazon Web Services account root user. Access key IDs beginning with
31
+ * <code>ASIA</code> are temporary credentials that are created using STS operations. If
32
+ * the account in the response belongs to you, you can sign in as the root user and review
33
+ * 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
34
+ * learn which IAM user owns the keys. To learn who requested the temporary credentials for
35
+ * an <code>ASIA</code> access key, view the STS events in your <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html">CloudTrail logs</a> in the
36
+ * <i>IAM User Guide</i>.</p>
37
+ * <p>This operation does not indicate the state of the access key. The key might be active,
38
+ * inactive, or deleted. Active keys might not have permissions to perform an operation.
39
+ * Providing a deleted access key might return an error that the key doesn't exist.</p>
40
+ * @example
41
+ * Use a bare-bones client and the command you need to make an API call.
42
+ * ```javascript
43
+ * import { STSClient, GetAccessKeyInfoCommand } from "@aws-sdk/client-sts"; // ES Modules import
44
+ * // const { STSClient, GetAccessKeyInfoCommand } = require("@aws-sdk/client-sts"); // CommonJS import
45
+ * const client = new STSClient(config);
46
+ * const input = { // GetAccessKeyInfoRequest
47
+ * AccessKeyId: "STRING_VALUE", // required
48
+ * };
49
+ * const command = new GetAccessKeyInfoCommand(input);
50
+ * const response = await client.send(command);
51
+ * // { // GetAccessKeyInfoResponse
52
+ * // Account: "STRING_VALUE",
53
+ * // };
54
+ *
55
+ * ```
56
+ *
57
+ * @param GetAccessKeyInfoCommandInput - {@link GetAccessKeyInfoCommandInput}
58
+ * @returns {@link GetAccessKeyInfoCommandOutput}
59
+ * @see {@link GetAccessKeyInfoCommandInput} for command's `input` shape.
60
+ * @see {@link GetAccessKeyInfoCommandOutput} for command's `response` shape.
61
+ * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
62
+ *
63
+ * @throws {@link STSServiceException}
64
+ * <p>Base exception class for all service exceptions from STS service.</p>
65
+ *
66
+ */
67
+ export declare class GetAccessKeyInfoCommand extends $Command<GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput, STSClientResolvedConfig> {
68
+ readonly input: GetAccessKeyInfoCommandInput;
69
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
70
+ /**
71
+ * @public
72
+ */
73
+ constructor(input: GetAccessKeyInfoCommandInput);
74
+ /**
75
+ * @internal
76
+ */
77
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput>;
78
+ /**
79
+ * @internal
80
+ */
81
+ private serialize;
82
+ /**
83
+ * @internal
84
+ */
85
+ private deserialize;
86
+ }