@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,151 +1,156 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "@aws-sdk/
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
1
|
+
import { EndpointsInputConfig, EndpointsResolvedConfig, RegionInputConfig, RegionResolvedConfig } from "@aws-sdk/config-resolver";
|
|
2
|
+
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
3
|
+
import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry";
|
|
4
|
+
import { StsAuthInputConfig, StsAuthResolvedConfig } from "@aws-sdk/middleware-sdk-sts";
|
|
5
|
+
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
6
|
+
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
7
|
+
import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
8
|
+
import { BodyLengthCalculator as __BodyLengthCalculator, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
9
|
+
import { AssumeRoleCommandInput, AssumeRoleCommandOutput } from "./commands/AssumeRoleCommand";
|
|
10
|
+
import { AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput } from "./commands/AssumeRoleWithSAMLCommand";
|
|
11
|
+
import { AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput } from "./commands/AssumeRoleWithWebIdentityCommand";
|
|
12
|
+
import { DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput } from "./commands/DecodeAuthorizationMessageCommand";
|
|
13
|
+
import { GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput } from "./commands/GetAccessKeyInfoCommand";
|
|
14
|
+
import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from "./commands/GetCallerIdentityCommand";
|
|
15
|
+
import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "./commands/GetFederationTokenCommand";
|
|
16
|
+
import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "./commands/GetSessionTokenCommand";
|
|
17
|
+
export declare type ServiceInputTypes = AssumeRoleCommandInput | AssumeRoleWithSAMLCommandInput | AssumeRoleWithWebIdentityCommandInput | DecodeAuthorizationMessageCommandInput | GetAccessKeyInfoCommandInput | GetCallerIdentityCommandInput | GetFederationTokenCommandInput | GetSessionTokenCommandInput;
|
|
18
|
+
export declare type ServiceOutputTypes = AssumeRoleCommandOutput | AssumeRoleWithSAMLCommandOutput | AssumeRoleWithWebIdentityCommandOutput | DecodeAuthorizationMessageCommandOutput | GetAccessKeyInfoCommandOutput | GetCallerIdentityCommandOutput | GetFederationTokenCommandOutput | GetSessionTokenCommandOutput;
|
|
19
|
+
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
20
|
+
/**
|
|
21
|
+
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
22
|
+
*/
|
|
23
|
+
requestHandler?: __HttpHandler;
|
|
24
|
+
/**
|
|
25
|
+
* A constructor for a class implementing the {@link __Hash} interface
|
|
26
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
sha256?: __HashConstructor;
|
|
30
|
+
/**
|
|
31
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
urlParser?: __UrlParser;
|
|
35
|
+
/**
|
|
36
|
+
* A function that can calculate the length of a request body.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
40
|
+
/**
|
|
41
|
+
* A function that converts a stream into an array of bytes.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
streamCollector?: __StreamCollector;
|
|
45
|
+
/**
|
|
46
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
base64Decoder?: __Decoder;
|
|
50
|
+
/**
|
|
51
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
base64Encoder?: __Encoder;
|
|
55
|
+
/**
|
|
56
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
utf8Decoder?: __Decoder;
|
|
60
|
+
/**
|
|
61
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
utf8Encoder?: __Encoder;
|
|
65
|
+
/**
|
|
66
|
+
* The runtime environment.
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
runtime?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Disable dyanamically changing the endpoint of the client based on the hostPrefix
|
|
72
|
+
* trait of an operation.
|
|
73
|
+
*/
|
|
74
|
+
disableHostPrefix?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
77
|
+
*/
|
|
78
|
+
maxAttempts?: number | __Provider<number>;
|
|
79
|
+
/**
|
|
80
|
+
* Specifies which retry algorithm to use.
|
|
81
|
+
*/
|
|
82
|
+
retryMode?: string | __Provider<string>;
|
|
83
|
+
/**
|
|
84
|
+
* Optional logger for logging debug/info/warn/error.
|
|
85
|
+
*/
|
|
86
|
+
logger?: __Logger;
|
|
87
|
+
/**
|
|
88
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
89
|
+
*/
|
|
90
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
91
|
+
/**
|
|
92
|
+
* Enables FIPS compatible endpoints.
|
|
93
|
+
*/
|
|
94
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Unique service identifier.
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
serviceId?: string;
|
|
100
|
+
/**
|
|
101
|
+
* The AWS region to which this client will send requests
|
|
102
|
+
*/
|
|
103
|
+
region?: string | __Provider<string>;
|
|
104
|
+
/**
|
|
105
|
+
* Default credentials provider; Not available in browser runtime.
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
|
|
109
|
+
/**
|
|
110
|
+
* Fetch related hostname, signing name or signing region with given region.
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
regionInfoProvider?: RegionInfoProvider;
|
|
114
|
+
/**
|
|
115
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
119
|
+
/**
|
|
120
|
+
* The {@link DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
121
|
+
*/
|
|
122
|
+
defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
|
|
123
|
+
}
|
|
124
|
+
declare type STSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & StsAuthInputConfig & UserAgentInputConfig;
|
|
125
|
+
/**
|
|
126
|
+
* The configuration interface of STSClient class constructor that set the region, credentials and other options.
|
|
127
|
+
*/
|
|
128
|
+
export interface STSClientConfig extends STSClientConfigType {
|
|
129
|
+
}
|
|
130
|
+
declare type STSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointsResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & StsAuthResolvedConfig & UserAgentResolvedConfig;
|
|
131
|
+
/**
|
|
132
|
+
* The resolved configuration interface of STSClient class. This is resolved and normalized from the {@link STSClientConfig | constructor configuration interface}.
|
|
133
|
+
*/
|
|
134
|
+
export interface STSClientResolvedConfig extends STSClientResolvedConfigType {
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* <fullname>Security Token Service</fullname>
|
|
138
|
+
* <p>Security Token Service (STS) enables you to request temporary, limited-privilege
|
|
139
|
+
* credentials for Identity and Access Management (IAM) users or for users that you
|
|
140
|
+
* authenticate (federated users). This guide provides descriptions of the STS API. For
|
|
141
|
+
* more information about using this service, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html">Temporary Security Credentials</a>.</p>
|
|
142
|
+
*/
|
|
143
|
+
export declare class STSClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig> {
|
|
144
|
+
/**
|
|
145
|
+
* The resolved configuration of STSClient class. This is resolved and normalized from the {@link STSClientConfig | constructor configuration interface}.
|
|
146
|
+
*/
|
|
147
|
+
readonly config: STSClientResolvedConfig;
|
|
148
|
+
constructor(configuration: STSClientConfig);
|
|
149
|
+
/**
|
|
150
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
151
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
152
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
153
|
+
*/
|
|
154
|
+
destroy(): void;
|
|
155
|
+
}
|
|
156
|
+
export {};
|
|
@@ -1,32 +1,124 @@
|
|
|
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
|
-
|
|
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 { AssumeRoleRequest, AssumeRoleResponse } from "../models/models_0";
|
|
4
|
+
import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
|
|
5
|
+
export interface AssumeRoleCommandInput extends AssumeRoleRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface AssumeRoleCommandOutput extends AssumeRoleResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Returns a set of temporary security credentials that you can use to access Amazon Web Services
|
|
11
|
+
* resources that you might not normally have access to. These temporary credentials consist
|
|
12
|
+
* of an access key ID, a secret access key, and a security token. Typically, you use
|
|
13
|
+
* <code>AssumeRole</code> within your account or for cross-account access. For a
|
|
14
|
+
* comparison of <code>AssumeRole</code> with other API operations that produce temporary
|
|
15
|
+
* credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
|
|
16
|
+
* Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
|
|
17
|
+
* Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
|
|
18
|
+
* <p>
|
|
19
|
+
* <b>Permissions</b>
|
|
20
|
+
* </p>
|
|
21
|
+
* <p>The temporary security credentials created by <code>AssumeRole</code> can be used to
|
|
22
|
+
* make API calls to any Amazon Web Services service with the following exception: You cannot call the
|
|
23
|
+
* Amazon Web Services STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
|
|
24
|
+
* operations.</p>
|
|
25
|
+
* <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
|
|
26
|
+
* this operation. You can pass a single JSON policy document to use as an inline session
|
|
27
|
+
* policy. You can also specify up to 10 managed policies to use as managed session policies.
|
|
28
|
+
* The plaintext that you use for both inline and managed session policies can't exceed 2,048
|
|
29
|
+
* characters. Passing policies to this operation returns new
|
|
30
|
+
* temporary credentials. The resulting session's permissions are the intersection of the
|
|
31
|
+
* role's identity-based policy and the session policies. You can use the role's temporary
|
|
32
|
+
* credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
|
|
33
|
+
* the role. You cannot use session policies to grant more permissions than those allowed
|
|
34
|
+
* by the identity-based policy of the role that is being assumed. For more information, see
|
|
35
|
+
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
|
|
36
|
+
* Policies</a> in the <i>IAM User Guide</i>.</p>
|
|
37
|
+
* <p>When you create a role, you create two policies: A role trust policy that specifies
|
|
38
|
+
* <i>who</i> can assume the role and a permissions policy that specifies
|
|
39
|
+
* <i>what</i> can be done with the role. You specify the trusted principal
|
|
40
|
+
* who is allowed to assume the role in the role trust policy.</p>
|
|
41
|
+
* <p>To assume a role from a different account, your Amazon Web Services account must be trusted by the
|
|
42
|
+
* role. The trust relationship is defined in the role's trust policy when the role is
|
|
43
|
+
* created. That trust policy states which accounts are allowed to delegate that access to
|
|
44
|
+
* users in the account. </p>
|
|
45
|
+
* <p>A user who wants to access a role in a different account must also have permissions that
|
|
46
|
+
* are delegated from the user account administrator. The administrator must attach a policy
|
|
47
|
+
* that allows the user to call <code>AssumeRole</code> for the ARN of the role in the other
|
|
48
|
+
* account.</p>
|
|
49
|
+
* <p>To allow a user to assume a role in the same account, you can do either of the
|
|
50
|
+
* following:</p>
|
|
51
|
+
* <ul>
|
|
52
|
+
* <li>
|
|
53
|
+
* <p>Attach a policy to the user that allows the user to call <code>AssumeRole</code>
|
|
54
|
+
* (as long as the role's trust policy trusts the account).</p>
|
|
55
|
+
* </li>
|
|
56
|
+
* <li>
|
|
57
|
+
* <p>Add the user as a principal directly in the role's trust policy.</p>
|
|
58
|
+
* </li>
|
|
59
|
+
* </ul>
|
|
60
|
+
* <p>You can do either because the role’s trust policy acts as an IAM resource-based
|
|
61
|
+
* policy. When a resource-based policy grants access to a principal in the same account, no
|
|
62
|
+
* additional identity-based policy is required. For more information about trust policies and
|
|
63
|
+
* resource-based policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">IAM Policies</a> in the
|
|
64
|
+
* <i>IAM User Guide</i>.</p>
|
|
65
|
+
*
|
|
66
|
+
* <p>
|
|
67
|
+
* <b>Tags</b>
|
|
68
|
+
* </p>
|
|
69
|
+
* <p>(Optional) You can pass tag key-value pairs to your session. These tags are called
|
|
70
|
+
* session tags. For more information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the
|
|
71
|
+
* <i>IAM User Guide</i>.</p>
|
|
72
|
+
* <p>An administrator must grant you the permissions necessary to pass session tags. The
|
|
73
|
+
* administrator can also create granular permissions to allow you to pass only specific
|
|
74
|
+
* 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
|
|
75
|
+
* for Attribute-Based Access Control</a> in the
|
|
76
|
+
* <i>IAM User Guide</i>.</p>
|
|
77
|
+
* <p>You can set the session tags as transitive. Transitive tags persist during role
|
|
78
|
+
* 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
|
|
79
|
+
* with Session Tags</a> in the <i>IAM User Guide</i>.</p>
|
|
80
|
+
* <p>
|
|
81
|
+
* <b>Using MFA with AssumeRole</b>
|
|
82
|
+
* </p>
|
|
83
|
+
* <p>(Optional) You can include multi-factor authentication (MFA) information when you call
|
|
84
|
+
* <code>AssumeRole</code>. This is useful for cross-account scenarios to ensure that the
|
|
85
|
+
* user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that
|
|
86
|
+
* scenario, the trust policy of the role being assumed includes a condition that tests for
|
|
87
|
+
* MFA authentication. If the caller does not include valid MFA information, the request to
|
|
88
|
+
* assume the role is denied. The condition in a trust policy that tests for MFA
|
|
89
|
+
* authentication might look like the following example.</p>
|
|
90
|
+
* <p>
|
|
91
|
+
* <code>"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}</code>
|
|
92
|
+
* </p>
|
|
93
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html">Configuring MFA-Protected API Access</a>
|
|
94
|
+
* in the <i>IAM User Guide</i> guide.</p>
|
|
95
|
+
* <p>To use MFA with <code>AssumeRole</code>, you pass values for the
|
|
96
|
+
* <code>SerialNumber</code> and <code>TokenCode</code> parameters. The
|
|
97
|
+
* <code>SerialNumber</code> value identifies the user's hardware or virtual MFA device.
|
|
98
|
+
* The <code>TokenCode</code> is the time-based one-time password (TOTP) that the MFA device
|
|
99
|
+
* produces. </p>
|
|
100
|
+
* @example
|
|
101
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
102
|
+
* ```javascript
|
|
103
|
+
* import { STSClient, AssumeRoleCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
104
|
+
* // const { STSClient, AssumeRoleCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
105
|
+
* const client = new STSClient(config);
|
|
106
|
+
* const command = new AssumeRoleCommand(input);
|
|
107
|
+
* const response = await client.send(command);
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* @see {@link AssumeRoleCommandInput} for command's `input` shape.
|
|
111
|
+
* @see {@link AssumeRoleCommandOutput} for command's `response` shape.
|
|
112
|
+
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
113
|
+
*
|
|
114
|
+
*/
|
|
115
|
+
export declare class AssumeRoleCommand extends $Command<AssumeRoleCommandInput, AssumeRoleCommandOutput, STSClientResolvedConfig> {
|
|
116
|
+
readonly input: AssumeRoleCommandInput;
|
|
117
|
+
constructor(input: AssumeRoleCommandInput);
|
|
118
|
+
/**
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleCommandInput, AssumeRoleCommandOutput>;
|
|
122
|
+
private serialize;
|
|
123
|
+
private deserialize;
|
|
124
|
+
}
|