@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,38 +1,124 @@
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
- GetCallerIdentityRequest,
11
- GetCallerIdentityResponse,
12
- } from "../models/models_0";
13
- import {
14
- ServiceInputTypes,
15
- ServiceOutputTypes,
16
- STSClientResolvedConfig,
17
- } from "../STSClient";
18
- export interface GetCallerIdentityCommandInput
19
- extends GetCallerIdentityRequest {}
20
- export interface GetCallerIdentityCommandOutput
21
- extends GetCallerIdentityResponse,
22
- __MetadataBearer {}
23
- export declare class GetCallerIdentityCommand extends $Command<
24
- GetCallerIdentityCommandInput,
25
- GetCallerIdentityCommandOutput,
26
- STSClientResolvedConfig
27
- > {
28
- readonly input: GetCallerIdentityCommandInput;
29
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
30
- constructor(input: GetCallerIdentityCommandInput);
31
- resolveMiddleware(
32
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
33
- configuration: STSClientResolvedConfig,
34
- options?: __HttpHandlerOptions
35
- ): Handler<GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput>;
36
- private serialize;
37
- private deserialize;
38
- }
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { GetCallerIdentityRequest, GetCallerIdentityResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
6
+ /**
7
+ * @public
8
+ *
9
+ * The input for {@link GetCallerIdentityCommand}.
10
+ */
11
+ export interface GetCallerIdentityCommandInput extends GetCallerIdentityRequest {
12
+ }
13
+ /**
14
+ * @public
15
+ *
16
+ * The output of {@link GetCallerIdentityCommand}.
17
+ */
18
+ export interface GetCallerIdentityCommandOutput extends GetCallerIdentityResponse, __MetadataBearer {
19
+ }
20
+ /**
21
+ * @public
22
+ * <p>Returns details about the IAM user or role whose credentials are used to call the operation.</p>
23
+ * <note>
24
+ * <p>No permissions are required to perform this operation. If an administrator
25
+ * attaches a policy to your identity that explicitly denies access to the
26
+ * <code>sts:GetCallerIdentity</code> action, you can still perform this operation.
27
+ * Permissions are not required because the same information is returned when access is denied. 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
28
+ * <i>IAM User Guide</i>.</p>
29
+ * </note>
30
+ * @example
31
+ * Use a bare-bones client and the command you need to make an API call.
32
+ * ```javascript
33
+ * import { STSClient, GetCallerIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import
34
+ * // const { STSClient, GetCallerIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import
35
+ * const client = new STSClient(config);
36
+ * const input = {};
37
+ * const command = new GetCallerIdentityCommand(input);
38
+ * const response = await client.send(command);
39
+ * // { // GetCallerIdentityResponse
40
+ * // UserId: "STRING_VALUE",
41
+ * // Account: "STRING_VALUE",
42
+ * // Arn: "STRING_VALUE",
43
+ * // };
44
+ *
45
+ * ```
46
+ *
47
+ * @param GetCallerIdentityCommandInput - {@link GetCallerIdentityCommandInput}
48
+ * @returns {@link GetCallerIdentityCommandOutput}
49
+ * @see {@link GetCallerIdentityCommandInput} for command's `input` shape.
50
+ * @see {@link GetCallerIdentityCommandOutput} for command's `response` shape.
51
+ * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
52
+ *
53
+ * @throws {@link STSServiceException}
54
+ * <p>Base exception class for all service exceptions from STS service.</p>
55
+ *
56
+ * @example To get details about a calling IAM user
57
+ * ```javascript
58
+ * // This example shows a request and response made with the credentials for a user named Alice in the AWS account 123456789012.
59
+ * const input = {};
60
+ * const command = new GetCallerIdentityCommand(input);
61
+ * const response = await client.send(command);
62
+ * /* response ==
63
+ * {
64
+ * "Account": "123456789012",
65
+ * "Arn": "arn:aws:iam::123456789012:user/Alice",
66
+ * "UserId": "AKIAI44QH8DHBEXAMPLE"
67
+ * }
68
+ * *\/
69
+ * // example id: to-get-details-about-a-calling-iam-user-1480540050376
70
+ * ```
71
+ *
72
+ * @example To get details about a calling user federated with AssumeRole
73
+ * ```javascript
74
+ * // This example shows a request and response made with temporary credentials created by AssumeRole. The name of the assumed role is my-role-name, and the RoleSessionName is set to my-role-session-name.
75
+ * const input = {};
76
+ * const command = new GetCallerIdentityCommand(input);
77
+ * const response = await client.send(command);
78
+ * /* response ==
79
+ * {
80
+ * "Account": "123456789012",
81
+ * "Arn": "arn:aws:sts::123456789012:assumed-role/my-role-name/my-role-session-name",
82
+ * "UserId": "AKIAI44QH8DHBEXAMPLE:my-role-session-name"
83
+ * }
84
+ * *\/
85
+ * // example id: to-get-details-about-a-calling-user-federated-with-assumerole-1480540158545
86
+ * ```
87
+ *
88
+ * @example To get details about a calling user federated with GetFederationToken
89
+ * ```javascript
90
+ * // This example shows a request and response made with temporary credentials created by using GetFederationToken. The Name parameter is set to my-federated-user-name.
91
+ * const input = {};
92
+ * const command = new GetCallerIdentityCommand(input);
93
+ * const response = await client.send(command);
94
+ * /* response ==
95
+ * {
96
+ * "Account": "123456789012",
97
+ * "Arn": "arn:aws:sts::123456789012:federated-user/my-federated-user-name",
98
+ * "UserId": "123456789012:my-federated-user-name"
99
+ * }
100
+ * *\/
101
+ * // example id: to-get-details-about-a-calling-user-federated-with-getfederationtoken-1480540231316
102
+ * ```
103
+ *
104
+ */
105
+ export declare class GetCallerIdentityCommand extends $Command<GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput, STSClientResolvedConfig> {
106
+ readonly input: GetCallerIdentityCommandInput;
107
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
108
+ /**
109
+ * @public
110
+ */
111
+ constructor(input: GetCallerIdentityCommandInput);
112
+ /**
113
+ * @internal
114
+ */
115
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput>;
116
+ /**
117
+ * @internal
118
+ */
119
+ private serialize;
120
+ /**
121
+ * @internal
122
+ */
123
+ private deserialize;
124
+ }
@@ -1,38 +1,235 @@
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
- GetFederationTokenRequest,
11
- GetFederationTokenResponse,
12
- } from "../models/models_0";
13
- import {
14
- ServiceInputTypes,
15
- ServiceOutputTypes,
16
- STSClientResolvedConfig,
17
- } from "../STSClient";
18
- export interface GetFederationTokenCommandInput
19
- extends GetFederationTokenRequest {}
20
- export interface GetFederationTokenCommandOutput
21
- extends GetFederationTokenResponse,
22
- __MetadataBearer {}
23
- export declare class GetFederationTokenCommand extends $Command<
24
- GetFederationTokenCommandInput,
25
- GetFederationTokenCommandOutput,
26
- STSClientResolvedConfig
27
- > {
28
- readonly input: GetFederationTokenCommandInput;
29
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
30
- constructor(input: GetFederationTokenCommandInput);
31
- resolveMiddleware(
32
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
33
- configuration: STSClientResolvedConfig,
34
- options?: __HttpHandlerOptions
35
- ): Handler<GetFederationTokenCommandInput, GetFederationTokenCommandOutput>;
36
- private serialize;
37
- private deserialize;
38
- }
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { GetFederationTokenRequest, GetFederationTokenResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
6
+ /**
7
+ * @public
8
+ *
9
+ * The input for {@link GetFederationTokenCommand}.
10
+ */
11
+ export interface GetFederationTokenCommandInput extends GetFederationTokenRequest {
12
+ }
13
+ /**
14
+ * @public
15
+ *
16
+ * The output of {@link GetFederationTokenCommand}.
17
+ */
18
+ export interface GetFederationTokenCommandOutput extends GetFederationTokenResponse, __MetadataBearer {
19
+ }
20
+ /**
21
+ * @public
22
+ * <p>Returns a set of temporary security credentials (consisting of an access key ID, a
23
+ * secret access key, and a security token) for a user. A typical use is in a proxy
24
+ * application that gets temporary security credentials on behalf of distributed applications
25
+ * inside a corporate network.</p>
26
+ * <p>You must call the <code>GetFederationToken</code> operation
27
+ * using the long-term security credentials of an IAM user. As a result, this call is
28
+ * appropriate in contexts where those credentials can be safeguarded, usually in a
29
+ * server-based application. For a comparison of <code>GetFederationToken</code> with the
30
+ * 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
31
+ * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
32
+ * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
33
+ * <p>Although it is possible to call <code>GetFederationToken</code> using the security credentials of an
34
+ * Amazon Web Services account root user rather than an IAM user that you create for the purpose of a proxy application, we do not recommend it. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials">Safeguard your root user credentials and don't use them for everyday tasks</a> in the
35
+ * <i>IAM User Guide</i>. </p>
36
+ * <note>
37
+ * <p>You can create a mobile-based or browser-based app that can authenticate users using
38
+ * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID
39
+ * Connect-compatible identity provider. In this case, we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon Cognito</a> or
40
+ * <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
41
+ * <i>IAM User Guide</i>.</p>
42
+ * </note>
43
+ * <p>
44
+ * <b>Session duration</b>
45
+ * </p>
46
+ * <p>The temporary credentials are valid for the specified duration, from 900 seconds (15
47
+ * minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is
48
+ * 43,200 seconds (12 hours). Temporary credentials obtained by using the root user credentials have a maximum duration of 3,600 seconds (1 hour).</p>
49
+ * <p>
50
+ * <b>Permissions</b>
51
+ * </p>
52
+ * <p>You can use the temporary credentials created by <code>GetFederationToken</code> in any
53
+ * Amazon Web Services service with the following exceptions:</p>
54
+ * <ul>
55
+ * <li>
56
+ * <p>You cannot call any IAM operations using the CLI or the Amazon Web Services API. This limitation does not apply to console sessions.</p>
57
+ * </li>
58
+ * <li>
59
+ * <p>You cannot call any STS operations except <code>GetCallerIdentity</code>.</p>
60
+ * </li>
61
+ * </ul>
62
+ * <p>You can use temporary credentials for single sign-on (SSO) to the console.</p>
63
+ * <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
64
+ * this operation. You can pass a single JSON policy document to use as an inline session
65
+ * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as
66
+ * managed session policies. The plaintext that you use for both inline and managed session
67
+ * policies can't exceed 2,048 characters.</p>
68
+ * <p>Though the session policy parameters are optional, if you do not pass a policy, then the
69
+ * resulting federated user session has no permissions. When you pass session policies, the
70
+ * session permissions are the intersection of the IAM user policies and the session
71
+ * policies that you pass. This gives you a way to further restrict the permissions for a
72
+ * federated user. You cannot use session policies to grant more permissions than those that
73
+ * 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
74
+ * Policies</a> in the <i>IAM User Guide</i>. For information about
75
+ * 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>
76
+ * <p>You can use the credentials to access a resource that has a resource-based policy. If
77
+ * that policy specifically references the federated user session in the
78
+ * <code>Principal</code> element of the policy, the session has the permissions allowed by
79
+ * the policy. These permissions are granted in addition to the permissions granted by the
80
+ * session policies.</p>
81
+ * <p>
82
+ * <b>Tags</b>
83
+ * </p>
84
+ * <p>(Optional) You can pass tag key-value pairs to your session. These are called session
85
+ * 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
86
+ * <i>IAM User Guide</i>.</p>
87
+ * <note>
88
+ * <p>You can create a mobile-based or browser-based app that can authenticate users using
89
+ * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID
90
+ * Connect-compatible identity provider. In this case, we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon Cognito</a> or
91
+ * <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
92
+ * <i>IAM User Guide</i>.</p>
93
+ * </note>
94
+ * <p>An administrator must grant you the permissions necessary to pass session tags. The
95
+ * administrator can also create granular permissions to allow you to pass only specific
96
+ * 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
97
+ * for Attribute-Based Access Control</a> in the
98
+ * <i>IAM User Guide</i>.</p>
99
+ * <p>Tag key–value pairs are not case sensitive, but case is preserved. This means that you
100
+ * cannot have separate <code>Department</code> and <code>department</code> tag keys. Assume
101
+ * that the user that you are federating has the
102
+ * <code>Department</code>=<code>Marketing</code> tag and you pass the
103
+ * <code>department</code>=<code>engineering</code> session tag. <code>Department</code>
104
+ * and <code>department</code> are not saved as separate tags, and the session tag passed in
105
+ * the request takes precedence over the user tag.</p>
106
+ * @example
107
+ * Use a bare-bones client and the command you need to make an API call.
108
+ * ```javascript
109
+ * import { STSClient, GetFederationTokenCommand } from "@aws-sdk/client-sts"; // ES Modules import
110
+ * // const { STSClient, GetFederationTokenCommand } = require("@aws-sdk/client-sts"); // CommonJS import
111
+ * const client = new STSClient(config);
112
+ * const input = { // GetFederationTokenRequest
113
+ * Name: "STRING_VALUE", // required
114
+ * Policy: "STRING_VALUE",
115
+ * PolicyArns: [ // policyDescriptorListType
116
+ * { // PolicyDescriptorType
117
+ * arn: "STRING_VALUE",
118
+ * },
119
+ * ],
120
+ * DurationSeconds: Number("int"),
121
+ * Tags: [ // tagListType
122
+ * { // Tag
123
+ * Key: "STRING_VALUE", // required
124
+ * Value: "STRING_VALUE", // required
125
+ * },
126
+ * ],
127
+ * };
128
+ * const command = new GetFederationTokenCommand(input);
129
+ * const response = await client.send(command);
130
+ * // { // GetFederationTokenResponse
131
+ * // Credentials: { // Credentials
132
+ * // AccessKeyId: "STRING_VALUE", // required
133
+ * // SecretAccessKey: "STRING_VALUE", // required
134
+ * // SessionToken: "STRING_VALUE", // required
135
+ * // Expiration: new Date("TIMESTAMP"), // required
136
+ * // },
137
+ * // FederatedUser: { // FederatedUser
138
+ * // FederatedUserId: "STRING_VALUE", // required
139
+ * // Arn: "STRING_VALUE", // required
140
+ * // },
141
+ * // PackedPolicySize: Number("int"),
142
+ * // };
143
+ *
144
+ * ```
145
+ *
146
+ * @param GetFederationTokenCommandInput - {@link GetFederationTokenCommandInput}
147
+ * @returns {@link GetFederationTokenCommandOutput}
148
+ * @see {@link GetFederationTokenCommandInput} for command's `input` shape.
149
+ * @see {@link GetFederationTokenCommandOutput} for command's `response` shape.
150
+ * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
151
+ *
152
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
153
+ * <p>The request was rejected because the policy document was malformed. The error message
154
+ * describes the specific error.</p>
155
+ *
156
+ * @throws {@link PackedPolicyTooLargeException} (client fault)
157
+ * <p>The request was rejected because the total packed size of the session policies and
158
+ * session tags combined was too large. An Amazon Web Services conversion compresses the session policy
159
+ * document, session policy ARNs, and session tags into a packed binary format that has a
160
+ * separate limit. The error message indicates by percentage how close the policies and
161
+ * 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
162
+ * the <i>IAM User Guide</i>.</p>
163
+ * <p>You could receive this error even though you meet other defined session policy and
164
+ * 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
165
+ * Character Limits</a> in the <i>IAM User Guide</i>.</p>
166
+ *
167
+ * @throws {@link RegionDisabledException} (client fault)
168
+ * <p>STS is not activated in the requested region for the account that is being asked to
169
+ * generate credentials. The account administrator must use the IAM console to activate STS
170
+ * 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
171
+ * Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>IAM User
172
+ * Guide</i>.</p>
173
+ *
174
+ * @throws {@link STSServiceException}
175
+ * <p>Base exception class for all service exceptions from STS service.</p>
176
+ *
177
+ * @example To get temporary credentials for a role by using GetFederationToken
178
+ * ```javascript
179
+ * //
180
+ * const input = {
181
+ * "DurationSeconds": 3600,
182
+ * "Name": "testFedUserSession",
183
+ * "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
184
+ * "Tags": [
185
+ * {
186
+ * "Key": "Project",
187
+ * "Value": "Pegasus"
188
+ * },
189
+ * {
190
+ * "Key": "Cost-Center",
191
+ * "Value": "98765"
192
+ * }
193
+ * ]
194
+ * };
195
+ * const command = new GetFederationTokenCommand(input);
196
+ * const response = await client.send(command);
197
+ * /* response ==
198
+ * {
199
+ * "Credentials": {
200
+ * "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
201
+ * "Expiration": "2011-07-15T23:28:33.359Z",
202
+ * "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
203
+ * "SessionToken": "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA=="
204
+ * },
205
+ * "FederatedUser": {
206
+ * "Arn": "arn:aws:sts::123456789012:federated-user/Bob",
207
+ * "FederatedUserId": "123456789012:Bob"
208
+ * },
209
+ * "PackedPolicySize": 8
210
+ * }
211
+ * *\/
212
+ * // example id: to-get-temporary-credentials-for-a-role-by-using-getfederationtoken-1480540749900
213
+ * ```
214
+ *
215
+ */
216
+ export declare class GetFederationTokenCommand extends $Command<GetFederationTokenCommandInput, GetFederationTokenCommandOutput, STSClientResolvedConfig> {
217
+ readonly input: GetFederationTokenCommandInput;
218
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
219
+ /**
220
+ * @public
221
+ */
222
+ constructor(input: GetFederationTokenCommandInput);
223
+ /**
224
+ * @internal
225
+ */
226
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetFederationTokenCommandInput, GetFederationTokenCommandOutput>;
227
+ /**
228
+ * @internal
229
+ */
230
+ private serialize;
231
+ /**
232
+ * @internal
233
+ */
234
+ private deserialize;
235
+ }
@@ -1,37 +1,162 @@
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
- GetSessionTokenRequest,
11
- GetSessionTokenResponse,
12
- } from "../models/models_0";
13
- import {
14
- ServiceInputTypes,
15
- ServiceOutputTypes,
16
- STSClientResolvedConfig,
17
- } from "../STSClient";
18
- export interface GetSessionTokenCommandInput extends GetSessionTokenRequest {}
19
- export interface GetSessionTokenCommandOutput
20
- extends GetSessionTokenResponse,
21
- __MetadataBearer {}
22
- export declare class GetSessionTokenCommand extends $Command<
23
- GetSessionTokenCommandInput,
24
- GetSessionTokenCommandOutput,
25
- STSClientResolvedConfig
26
- > {
27
- readonly input: GetSessionTokenCommandInput;
28
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
29
- constructor(input: GetSessionTokenCommandInput);
30
- resolveMiddleware(
31
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
32
- configuration: STSClientResolvedConfig,
33
- options?: __HttpHandlerOptions
34
- ): Handler<GetSessionTokenCommandInput, GetSessionTokenCommandOutput>;
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 { GetSessionTokenRequest, GetSessionTokenResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
6
+ /**
7
+ * @public
8
+ *
9
+ * The input for {@link GetSessionTokenCommand}.
10
+ */
11
+ export interface GetSessionTokenCommandInput extends GetSessionTokenRequest {
12
+ }
13
+ /**
14
+ * @public
15
+ *
16
+ * The output of {@link GetSessionTokenCommand}.
17
+ */
18
+ export interface GetSessionTokenCommandOutput extends GetSessionTokenResponse, __MetadataBearer {
19
+ }
20
+ /**
21
+ * @public
22
+ * <p>Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The
23
+ * credentials consist of an access key ID, a secret access key, and a security token.
24
+ * Typically, you use <code>GetSessionToken</code> if you want to use MFA to protect
25
+ * programmatic calls to specific Amazon Web Services API operations like Amazon EC2 <code>StopInstances</code>.</p>
26
+ * <p>MFA-enabled IAM users must call <code>GetSessionToken</code> and submit an MFA
27
+ * code that is associated with their MFA device. Using the temporary security credentials
28
+ * that the call returns, IAM users can then make programmatic calls to API
29
+ * operations that require MFA authentication. An incorrect MFA code causes the API to return an access denied error. For a comparison of <code>GetSessionToken</code>
30
+ * 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
31
+ * Temporary Security Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
32
+ * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
33
+ * <note>
34
+ * <p>No permissions are required for users to perform this operation. The purpose of the
35
+ * <code>sts:GetSessionToken</code> operation is to authenticate the user using MFA. You
36
+ * cannot use policies to control authentication operations. For more information, see
37
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html">Permissions for GetSessionToken</a> in the
38
+ * <i>IAM User Guide</i>.</p>
39
+ * </note>
40
+ * <p>
41
+ * <b>Session Duration</b>
42
+ * </p>
43
+ * <p>The <code>GetSessionToken</code> operation must be called by using the long-term Amazon Web Services
44
+ * security credentials of an IAM user. Credentials that are
45
+ * created by IAM users are valid for the duration that you specify. This duration can range
46
+ * from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default
47
+ * of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900
48
+ * seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour. </p>
49
+ * <p>
50
+ * <b>Permissions</b>
51
+ * </p>
52
+ * <p>The temporary security credentials created by <code>GetSessionToken</code> can be used
53
+ * to make API calls to any Amazon Web Services service with the following exceptions:</p>
54
+ * <ul>
55
+ * <li>
56
+ * <p>You cannot call any IAM API operations unless MFA authentication information is
57
+ * included in the request.</p>
58
+ * </li>
59
+ * <li>
60
+ * <p>You cannot call any STS API <i>except</i>
61
+ * <code>AssumeRole</code> or <code>GetCallerIdentity</code>.</p>
62
+ * </li>
63
+ * </ul>
64
+ * <p>The credentials that <code>GetSessionToken</code> returns are based on
65
+ * permissions associated with the IAM user whose credentials were used to call the operation. The
66
+ * temporary credentials have the same permissions as the IAM user.</p>
67
+ * <note>
68
+ * <p>Although it is possible to call <code>GetSessionToken</code> using the security credentials of an
69
+ * Amazon Web Services account root user rather than an IAM user, we do not recommend it. If
70
+ * <code>GetSessionToken</code> is called using root user credentials, the
71
+ * temporary credentials have root user permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials">Safeguard your root user credentials and don't use them for everyday tasks</a> in the
72
+ * <i>IAM User Guide</i>
73
+ * </p>
74
+ * </note>
75
+ * <p>For more information about using <code>GetSessionToken</code> to create temporary
76
+ * credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken">Temporary
77
+ * Credentials for Users in Untrusted Environments</a> in the
78
+ * <i>IAM User Guide</i>. </p>
79
+ * @example
80
+ * Use a bare-bones client and the command you need to make an API call.
81
+ * ```javascript
82
+ * import { STSClient, GetSessionTokenCommand } from "@aws-sdk/client-sts"; // ES Modules import
83
+ * // const { STSClient, GetSessionTokenCommand } = require("@aws-sdk/client-sts"); // CommonJS import
84
+ * const client = new STSClient(config);
85
+ * const input = { // GetSessionTokenRequest
86
+ * DurationSeconds: Number("int"),
87
+ * SerialNumber: "STRING_VALUE",
88
+ * TokenCode: "STRING_VALUE",
89
+ * };
90
+ * const command = new GetSessionTokenCommand(input);
91
+ * const response = await client.send(command);
92
+ * // { // GetSessionTokenResponse
93
+ * // Credentials: { // Credentials
94
+ * // AccessKeyId: "STRING_VALUE", // required
95
+ * // SecretAccessKey: "STRING_VALUE", // required
96
+ * // SessionToken: "STRING_VALUE", // required
97
+ * // Expiration: new Date("TIMESTAMP"), // required
98
+ * // },
99
+ * // };
100
+ *
101
+ * ```
102
+ *
103
+ * @param GetSessionTokenCommandInput - {@link GetSessionTokenCommandInput}
104
+ * @returns {@link GetSessionTokenCommandOutput}
105
+ * @see {@link GetSessionTokenCommandInput} for command's `input` shape.
106
+ * @see {@link GetSessionTokenCommandOutput} for command's `response` shape.
107
+ * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
108
+ *
109
+ * @throws {@link RegionDisabledException} (client fault)
110
+ * <p>STS is not activated in the requested region for the account that is being asked to
111
+ * generate credentials. The account administrator must use the IAM console to activate STS
112
+ * 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
113
+ * Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>IAM User
114
+ * Guide</i>.</p>
115
+ *
116
+ * @throws {@link STSServiceException}
117
+ * <p>Base exception class for all service exceptions from STS service.</p>
118
+ *
119
+ * @example To get temporary credentials for an IAM user or an AWS account
120
+ * ```javascript
121
+ * //
122
+ * const input = {
123
+ * "DurationSeconds": 3600,
124
+ * "SerialNumber": "YourMFASerialNumber",
125
+ * "TokenCode": "123456"
126
+ * };
127
+ * const command = new GetSessionTokenCommand(input);
128
+ * const response = await client.send(command);
129
+ * /* response ==
130
+ * {
131
+ * "Credentials": {
132
+ * "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
133
+ * "Expiration": "2011-07-11T19:55:29.611Z",
134
+ * "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
135
+ * "SessionToken": "AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/LTo6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3zrkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtpZ3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE"
136
+ * }
137
+ * }
138
+ * *\/
139
+ * // example id: to-get-temporary-credentials-for-an-iam-user-or-an-aws-account-1480540814038
140
+ * ```
141
+ *
142
+ */
143
+ export declare class GetSessionTokenCommand extends $Command<GetSessionTokenCommandInput, GetSessionTokenCommandOutput, STSClientResolvedConfig> {
144
+ readonly input: GetSessionTokenCommandInput;
145
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
146
+ /**
147
+ * @public
148
+ */
149
+ constructor(input: GetSessionTokenCommandInput);
150
+ /**
151
+ * @internal
152
+ */
153
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetSessionTokenCommandInput, GetSessionTokenCommandOutput>;
154
+ /**
155
+ * @internal
156
+ */
157
+ private serialize;
158
+ /**
159
+ * @internal
160
+ */
161
+ private deserialize;
162
+ }