@aws-sdk/client-sts 3.185.0 → 3.186.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.
- package/CHANGELOG.md +8 -0
- package/dist-cjs/protocols/Aws_query.js +2 -2
- package/dist-cjs/xml-parser.js +18 -0
- package/dist-es/protocols/Aws_query.js +1 -1
- package/dist-es/xml-parser.js +15 -0
- package/dist-types/ts3.4/STS.d.ts +626 -140
- package/dist-types/ts3.4/STSClient.d.ts +156 -151
- package/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +124 -32
- package/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +166 -36
- package/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +170 -39
- package/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +70 -39
- package/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +52 -35
- package/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +44 -36
- package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +120 -36
- package/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +93 -35
- package/dist-types/ts3.4/commands/index.d.ts +8 -8
- package/dist-types/ts3.4/defaultRoleAssumers.d.ts +20 -22
- package/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +35 -25
- package/dist-types/ts3.4/endpoints.d.ts +2 -2
- package/dist-types/ts3.4/index.d.ts +6 -6
- package/dist-types/ts3.4/models/STSServiceException.d.ts +10 -7
- package/dist-types/ts3.4/models/index.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +1146 -238
- package/dist-types/ts3.4/protocols/Aws_query.d.ts +26 -101
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +40 -67
- package/dist-types/ts3.4/runtimeConfig.d.ts +40 -65
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +39 -68
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +13 -10
- package/dist-types/ts3.4/xml-parser.d.ts +4 -0
- package/dist-types/xml-parser.d.ts +4 -0
- package/package.json +34 -34
|
@@ -1,36 +1,44 @@
|
|
|
1
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { GetCallerIdentityRequest, GetCallerIdentityResponse } from "../models/models_0";
|
|
4
|
+
import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
|
|
5
|
+
export interface GetCallerIdentityCommandInput extends GetCallerIdentityRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface GetCallerIdentityCommandOutput extends GetCallerIdentityResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Returns details about the IAM user or role whose credentials are used to call the
|
|
11
|
+
* operation.</p>
|
|
12
|
+
* <note>
|
|
13
|
+
* <p>No permissions are required to perform this operation. If an administrator adds a
|
|
14
|
+
* policy to your IAM user or role that explicitly denies access to the
|
|
15
|
+
* <code>sts:GetCallerIdentity</code> action, you can still perform this operation.
|
|
16
|
+
* Permissions are not required because the same information is returned when an IAM user
|
|
17
|
+
* 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
|
|
18
|
+
* <i>IAM User Guide</i>.</p>
|
|
19
|
+
* </note>
|
|
20
|
+
* @example
|
|
21
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
22
|
+
* ```javascript
|
|
23
|
+
* import { STSClient, GetCallerIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
24
|
+
* // const { STSClient, GetCallerIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
25
|
+
* const client = new STSClient(config);
|
|
26
|
+
* const command = new GetCallerIdentityCommand(input);
|
|
27
|
+
* const response = await client.send(command);
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @see {@link GetCallerIdentityCommandInput} for command's `input` shape.
|
|
31
|
+
* @see {@link GetCallerIdentityCommandOutput} for command's `response` shape.
|
|
32
|
+
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export declare class GetCallerIdentityCommand extends $Command<GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput, STSClientResolvedConfig> {
|
|
36
|
+
readonly input: GetCallerIdentityCommandInput;
|
|
37
|
+
constructor(input: GetCallerIdentityCommandInput);
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput>;
|
|
42
|
+
private serialize;
|
|
43
|
+
private deserialize;
|
|
44
|
+
}
|
|
@@ -1,36 +1,120 @@
|
|
|
1
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { GetFederationTokenRequest, GetFederationTokenResponse } from "../models/models_0";
|
|
4
|
+
import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
|
|
5
|
+
export interface GetFederationTokenCommandInput extends GetFederationTokenRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface GetFederationTokenCommandOutput extends GetFederationTokenResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Returns a set of temporary security credentials (consisting of an access key ID, a
|
|
11
|
+
* secret access key, and a security token) for a federated user. A typical use is in a proxy
|
|
12
|
+
* application that gets temporary security credentials on behalf of distributed applications
|
|
13
|
+
* inside a corporate network. You must call the <code>GetFederationToken</code> operation
|
|
14
|
+
* using the long-term security credentials of an IAM user. As a result, this call is
|
|
15
|
+
* appropriate in contexts where those credentials can be safely stored, usually in a
|
|
16
|
+
* server-based application. For a comparison of <code>GetFederationToken</code> with the
|
|
17
|
+
* 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
|
|
18
|
+
* Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
|
|
19
|
+
* Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
|
|
20
|
+
* <note>
|
|
21
|
+
* <p>You can create a mobile-based or browser-based app that can authenticate users using
|
|
22
|
+
* a web identity provider like Login with Amazon, Facebook, Google, or an OpenID
|
|
23
|
+
* Connect-compatible identity provider. In this case, we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon Cognito</a> or
|
|
24
|
+
* <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
|
|
25
|
+
* <i>IAM User Guide</i>.</p>
|
|
26
|
+
* </note>
|
|
27
|
+
* <p>You can also call <code>GetFederationToken</code> using the security credentials of an
|
|
28
|
+
* Amazon Web Services account root user, but we do not recommend it. Instead, we recommend that you create
|
|
29
|
+
* an IAM user for the purpose of the proxy application. Then attach a policy to the IAM
|
|
30
|
+
* user that limits federated users to only the actions and resources that they need to
|
|
31
|
+
* access. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html">IAM Best Practices</a> in the
|
|
32
|
+
* <i>IAM User Guide</i>. </p>
|
|
33
|
+
* <p>
|
|
34
|
+
* <b>Session duration</b>
|
|
35
|
+
* </p>
|
|
36
|
+
* <p>The temporary credentials are valid for the specified duration, from 900 seconds (15
|
|
37
|
+
* minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is
|
|
38
|
+
* 43,200 seconds (12 hours). Temporary credentials obtained by using the Amazon Web Services account root
|
|
39
|
+
* user credentials have a maximum duration of 3,600 seconds (1 hour).</p>
|
|
40
|
+
* <p>
|
|
41
|
+
* <b>Permissions</b>
|
|
42
|
+
* </p>
|
|
43
|
+
* <p>You can use the temporary credentials created by <code>GetFederationToken</code> in any
|
|
44
|
+
* Amazon Web Services service except the following:</p>
|
|
45
|
+
* <ul>
|
|
46
|
+
* <li>
|
|
47
|
+
* <p>You cannot call any IAM operations using the CLI or the Amazon Web Services API. </p>
|
|
48
|
+
* </li>
|
|
49
|
+
* <li>
|
|
50
|
+
* <p>You cannot call any STS operations except <code>GetCallerIdentity</code>.</p>
|
|
51
|
+
* </li>
|
|
52
|
+
* </ul>
|
|
53
|
+
* <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
|
|
54
|
+
* this operation. You can pass a single JSON policy document to use as an inline session
|
|
55
|
+
* policy. You can also specify up to 10 managed policies to use as managed session policies.
|
|
56
|
+
* The plaintext that you use for both inline and managed session policies can't exceed 2,048
|
|
57
|
+
* characters.</p>
|
|
58
|
+
* <p>Though the session policy parameters are optional, if you do not pass a policy, then the
|
|
59
|
+
* resulting federated user session has no permissions. When you pass session policies, the
|
|
60
|
+
* session permissions are the intersection of the IAM user policies and the session
|
|
61
|
+
* policies that you pass. This gives you a way to further restrict the permissions for a
|
|
62
|
+
* federated user. You cannot use session policies to grant more permissions than those that
|
|
63
|
+
* 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
|
|
64
|
+
* Policies</a> in the <i>IAM User Guide</i>. For information about
|
|
65
|
+
* 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>
|
|
66
|
+
* <p>You can use the credentials to access a resource that has a resource-based policy. If
|
|
67
|
+
* that policy specifically references the federated user session in the
|
|
68
|
+
* <code>Principal</code> element of the policy, the session has the permissions allowed by
|
|
69
|
+
* the policy. These permissions are granted in addition to the permissions granted by the
|
|
70
|
+
* session policies.</p>
|
|
71
|
+
* <p>
|
|
72
|
+
* <b>Tags</b>
|
|
73
|
+
* </p>
|
|
74
|
+
* <p>(Optional) You can pass tag key-value pairs to your session. These are called session
|
|
75
|
+
* 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
|
|
76
|
+
* <i>IAM User Guide</i>.</p>
|
|
77
|
+
* <note>
|
|
78
|
+
* <p>You can create a mobile-based or browser-based app that can authenticate users using
|
|
79
|
+
* a web identity provider like Login with Amazon, Facebook, Google, or an OpenID
|
|
80
|
+
* Connect-compatible identity provider. In this case, we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon Cognito</a> or
|
|
81
|
+
* <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
|
|
82
|
+
* <i>IAM User Guide</i>.</p>
|
|
83
|
+
* </note>
|
|
84
|
+
* <p>An administrator must grant you the permissions necessary to pass session tags. The
|
|
85
|
+
* administrator can also create granular permissions to allow you to pass only specific
|
|
86
|
+
* 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
|
|
87
|
+
* for Attribute-Based Access Control</a> in the
|
|
88
|
+
* <i>IAM User Guide</i>.</p>
|
|
89
|
+
* <p>Tag key–value pairs are not case sensitive, but case is preserved. This means that you
|
|
90
|
+
* cannot have separate <code>Department</code> and <code>department</code> tag keys. Assume
|
|
91
|
+
* that the user that you are federating has the
|
|
92
|
+
* <code>Department</code>=<code>Marketing</code> tag and you pass the
|
|
93
|
+
* <code>department</code>=<code>engineering</code> session tag. <code>Department</code>
|
|
94
|
+
* and <code>department</code> are not saved as separate tags, and the session tag passed in
|
|
95
|
+
* the request takes precedence over the user tag.</p>
|
|
96
|
+
* @example
|
|
97
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
98
|
+
* ```javascript
|
|
99
|
+
* import { STSClient, GetFederationTokenCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
100
|
+
* // const { STSClient, GetFederationTokenCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
101
|
+
* const client = new STSClient(config);
|
|
102
|
+
* const command = new GetFederationTokenCommand(input);
|
|
103
|
+
* const response = await client.send(command);
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* @see {@link GetFederationTokenCommandInput} for command's `input` shape.
|
|
107
|
+
* @see {@link GetFederationTokenCommandOutput} for command's `response` shape.
|
|
108
|
+
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
109
|
+
*
|
|
110
|
+
*/
|
|
111
|
+
export declare class GetFederationTokenCommand extends $Command<GetFederationTokenCommandInput, GetFederationTokenCommandOutput, STSClientResolvedConfig> {
|
|
112
|
+
readonly input: GetFederationTokenCommandInput;
|
|
113
|
+
constructor(input: GetFederationTokenCommandInput);
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetFederationTokenCommandInput, GetFederationTokenCommandOutput>;
|
|
118
|
+
private serialize;
|
|
119
|
+
private deserialize;
|
|
120
|
+
}
|
|
@@ -1,35 +1,93 @@
|
|
|
1
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { GetSessionTokenRequest, GetSessionTokenResponse } from "../models/models_0";
|
|
4
|
+
import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
|
|
5
|
+
export interface GetSessionTokenCommandInput extends GetSessionTokenRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface GetSessionTokenCommandOutput extends GetSessionTokenResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The
|
|
11
|
+
* credentials consist of an access key ID, a secret access key, and a security token.
|
|
12
|
+
* Typically, you use <code>GetSessionToken</code> if you want to use MFA to protect
|
|
13
|
+
* programmatic calls to specific Amazon Web Services API operations like Amazon EC2 <code>StopInstances</code>.
|
|
14
|
+
* MFA-enabled IAM users would need to call <code>GetSessionToken</code> and submit an MFA
|
|
15
|
+
* code that is associated with their MFA device. Using the temporary security credentials
|
|
16
|
+
* that are returned from the call, IAM users can then make programmatic calls to API
|
|
17
|
+
* operations that require MFA authentication. If you do not supply a correct MFA code, then
|
|
18
|
+
* the API returns an access denied error. For a comparison of <code>GetSessionToken</code>
|
|
19
|
+
* 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
|
|
20
|
+
* Temporary Security Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
|
|
21
|
+
* Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
|
|
22
|
+
* <note>
|
|
23
|
+
* <p>No permissions are required for users to perform this operation. The purpose of the
|
|
24
|
+
* <code>sts:GetSessionToken</code> operation is to authenticate the user using MFA. You
|
|
25
|
+
* cannot use policies to control authentication operations. For more information, see
|
|
26
|
+
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html">Permissions for GetSessionToken</a> in the
|
|
27
|
+
* <i>IAM User Guide</i>.</p>
|
|
28
|
+
* </note>
|
|
29
|
+
* <p>
|
|
30
|
+
* <b>Session Duration</b>
|
|
31
|
+
* </p>
|
|
32
|
+
* <p>The <code>GetSessionToken</code> operation must be called by using the long-term Amazon Web Services
|
|
33
|
+
* security credentials of the Amazon Web Services account root user or an IAM user. Credentials that are
|
|
34
|
+
* created by IAM users are valid for the duration that you specify. This duration can range
|
|
35
|
+
* from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default
|
|
36
|
+
* of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900
|
|
37
|
+
* seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour. </p>
|
|
38
|
+
* <p>
|
|
39
|
+
* <b>Permissions</b>
|
|
40
|
+
* </p>
|
|
41
|
+
* <p>The temporary security credentials created by <code>GetSessionToken</code> can be used
|
|
42
|
+
* to make API calls to any Amazon Web Services service with the following exceptions:</p>
|
|
43
|
+
* <ul>
|
|
44
|
+
* <li>
|
|
45
|
+
* <p>You cannot call any IAM API operations unless MFA authentication information is
|
|
46
|
+
* included in the request.</p>
|
|
47
|
+
* </li>
|
|
48
|
+
* <li>
|
|
49
|
+
* <p>You cannot call any STS API <i>except</i>
|
|
50
|
+
* <code>AssumeRole</code> or <code>GetCallerIdentity</code>.</p>
|
|
51
|
+
* </li>
|
|
52
|
+
* </ul>
|
|
53
|
+
* <note>
|
|
54
|
+
* <p>We recommend that you do not call <code>GetSessionToken</code> with Amazon Web Services account
|
|
55
|
+
* 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
|
|
56
|
+
* creating one or more IAM users, giving them the necessary permissions, and using IAM
|
|
57
|
+
* users for everyday interaction with Amazon Web Services. </p>
|
|
58
|
+
* </note>
|
|
59
|
+
* <p>The credentials that are returned by <code>GetSessionToken</code> are based on
|
|
60
|
+
* permissions associated with the user whose credentials were used to call the operation. If
|
|
61
|
+
* <code>GetSessionToken</code> is called using Amazon Web Services account root user credentials, the
|
|
62
|
+
* temporary credentials have root user permissions. Similarly, if
|
|
63
|
+
* <code>GetSessionToken</code> is called using the credentials of an IAM user, the
|
|
64
|
+
* temporary credentials have the same permissions as the IAM user. </p>
|
|
65
|
+
* <p>For more information about using <code>GetSessionToken</code> to create temporary
|
|
66
|
+
* credentials, go to <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken">Temporary
|
|
67
|
+
* Credentials for Users in Untrusted Environments</a> in the
|
|
68
|
+
* <i>IAM User Guide</i>. </p>
|
|
69
|
+
* @example
|
|
70
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
71
|
+
* ```javascript
|
|
72
|
+
* import { STSClient, GetSessionTokenCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
73
|
+
* // const { STSClient, GetSessionTokenCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
74
|
+
* const client = new STSClient(config);
|
|
75
|
+
* const command = new GetSessionTokenCommand(input);
|
|
76
|
+
* const response = await client.send(command);
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @see {@link GetSessionTokenCommandInput} for command's `input` shape.
|
|
80
|
+
* @see {@link GetSessionTokenCommandOutput} for command's `response` shape.
|
|
81
|
+
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
84
|
+
export declare class GetSessionTokenCommand extends $Command<GetSessionTokenCommandInput, GetSessionTokenCommandOutput, STSClientResolvedConfig> {
|
|
85
|
+
readonly input: GetSessionTokenCommandInput;
|
|
86
|
+
constructor(input: GetSessionTokenCommandInput);
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetSessionTokenCommandInput, GetSessionTokenCommandOutput>;
|
|
91
|
+
private serialize;
|
|
92
|
+
private deserialize;
|
|
93
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./AssumeRoleCommand";
|
|
2
|
-
export * from "./AssumeRoleWithSAMLCommand";
|
|
3
|
-
export * from "./AssumeRoleWithWebIdentityCommand";
|
|
4
|
-
export * from "./DecodeAuthorizationMessageCommand";
|
|
5
|
-
export * from "./GetAccessKeyInfoCommand";
|
|
6
|
-
export * from "./GetCallerIdentityCommand";
|
|
7
|
-
export * from "./GetFederationTokenCommand";
|
|
8
|
-
export * from "./GetSessionTokenCommand";
|
|
1
|
+
export * from "./AssumeRoleCommand";
|
|
2
|
+
export * from "./AssumeRoleWithSAMLCommand";
|
|
3
|
+
export * from "./AssumeRoleWithWebIdentityCommand";
|
|
4
|
+
export * from "./DecodeAuthorizationMessageCommand";
|
|
5
|
+
export * from "./GetAccessKeyInfoCommand";
|
|
6
|
+
export * from "./GetCallerIdentityCommand";
|
|
7
|
+
export * from "./GetFederationTokenCommand";
|
|
8
|
+
export * from "./GetSessionTokenCommand";
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { Pluggable } from "@aws-sdk/types";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export declare const decorateDefaultCredentialProvider: (
|
|
21
|
-
provider: DefaultCredentialProvider
|
|
22
|
-
) => DefaultCredentialProvider;
|
|
1
|
+
import { Pluggable } from "@aws-sdk/types";
|
|
2
|
+
import { DefaultCredentialProvider, RoleAssumer, RoleAssumerWithWebIdentity } from "./defaultStsRoleAssumers";
|
|
3
|
+
import { ServiceInputTypes, ServiceOutputTypes, STSClientConfig } from "./STSClient";
|
|
4
|
+
/**
|
|
5
|
+
* The default role assumer that used by credential providers when sts:AssumeRole API is needed.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getDefaultRoleAssumer: (stsOptions?: Pick<STSClientConfig, "logger" | "region" | "requestHandler">, stsPlugins?: Pluggable<ServiceInputTypes, ServiceOutputTypes>[] | undefined) => RoleAssumer;
|
|
8
|
+
/**
|
|
9
|
+
* The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getDefaultRoleAssumerWithWebIdentity: (stsOptions?: Pick<STSClientConfig, "logger" | "region" | "requestHandler">, stsPlugins?: Pluggable<ServiceInputTypes, ServiceOutputTypes>[] | undefined) => RoleAssumerWithWebIdentity;
|
|
12
|
+
/**
|
|
13
|
+
* The default credential providers depend STS client to assume role with desired API: sts:assumeRole,
|
|
14
|
+
* sts:assumeRoleWithWebIdentity, etc. This function decorates the default credential provider with role assumers which
|
|
15
|
+
* encapsulates the process of calling STS commands. This can only be imported by AWS client packages to avoid circular
|
|
16
|
+
* dependencies.
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare const decorateDefaultCredentialProvider: (provider: DefaultCredentialProvider) => DefaultCredentialProvider;
|
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
import { Credentials, Provider } from "@aws-sdk/types";
|
|
2
|
-
import { AssumeRoleCommandInput } from "./commands/AssumeRoleCommand";
|
|
3
|
-
import { AssumeRoleWithWebIdentityCommandInput } from "./commands/AssumeRoleWithWebIdentityCommand";
|
|
4
|
-
import { STSClient, STSClientConfig } from "./STSClient";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
) => Promise<Credentials>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
) =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import { Credentials, Provider } from "@aws-sdk/types";
|
|
2
|
+
import { AssumeRoleCommandInput } from "./commands/AssumeRoleCommand";
|
|
3
|
+
import { AssumeRoleWithWebIdentityCommandInput } from "./commands/AssumeRoleWithWebIdentityCommand";
|
|
4
|
+
import { STSClient, STSClientConfig } from "./STSClient";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare type RoleAssumer = (sourceCreds: Credentials, params: AssumeRoleCommandInput) => Promise<Credentials>;
|
|
9
|
+
/**
|
|
10
|
+
* The default role assumer that used by credential providers when sts:AssumeRole API is needed.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare const getDefaultRoleAssumer: (stsOptions: Pick<STSClientConfig, "logger" | "region" | "requestHandler">, stsClientCtor: new (options: STSClientConfig) => STSClient) => RoleAssumer;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare type RoleAssumerWithWebIdentity = (params: AssumeRoleWithWebIdentityCommandInput) => Promise<Credentials>;
|
|
18
|
+
/**
|
|
19
|
+
* The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare const getDefaultRoleAssumerWithWebIdentity: (stsOptions: Pick<STSClientConfig, "logger" | "region" | "requestHandler">, stsClientCtor: new (options: STSClientConfig) => STSClient) => RoleAssumerWithWebIdentity;
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare type DefaultCredentialProvider = (input: any) => Provider<Credentials>;
|
|
27
|
+
/**
|
|
28
|
+
* The default credential providers depend STS client to assume role with desired API: sts:assumeRole,
|
|
29
|
+
* sts:assumeRoleWithWebIdentity, etc. This function decorates the default credential provider with role assumers which
|
|
30
|
+
* encapsulates the process of calling STS commands. This can only be imported by AWS client packages to avoid circular
|
|
31
|
+
* dependencies.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare const decorateDefaultCredentialProvider: (provider: DefaultCredentialProvider) => DefaultCredentialProvider;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RegionInfoProvider } from "@aws-sdk/types";
|
|
2
|
-
export declare const defaultRegionInfoProvider: RegionInfoProvider;
|
|
1
|
+
import { RegionInfoProvider } from "@aws-sdk/types";
|
|
2
|
+
export declare const defaultRegionInfoProvider: RegionInfoProvider;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./STS";
|
|
2
|
-
export * from "./STSClient";
|
|
3
|
-
export * from "./commands";
|
|
4
|
-
export * from "./defaultRoleAssumers";
|
|
5
|
-
export * from "./models";
|
|
6
|
-
export { STSServiceException } from "./models/STSServiceException";
|
|
1
|
+
export * from "./STS";
|
|
2
|
+
export * from "./STSClient";
|
|
3
|
+
export * from "./commands";
|
|
4
|
+
export * from "./defaultRoleAssumers";
|
|
5
|
+
export * from "./models";
|
|
6
|
+
export { STSServiceException } from "./models/STSServiceException";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare class STSServiceException extends __ServiceException {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
|
|
2
|
+
/**
|
|
3
|
+
* Base exception class for all service exceptions from STS service.
|
|
4
|
+
*/
|
|
5
|
+
export declare class STSServiceException extends __ServiceException {
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
constructor(options: __ServiceExceptionOptions);
|
|
10
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./models_0";
|
|
1
|
+
export * from "./models_0";
|