@aws-sdk/client-sts 3.288.0 → 3.290.0
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/dist-types/commands/AssumeRoleCommand.d.ts +74 -0
- package/dist-types/commands/AssumeRoleWithSAMLCommand.d.ts +71 -0
- package/dist-types/commands/AssumeRoleWithWebIdentityCommand.d.ts +78 -0
- package/dist-types/commands/DecodeAuthorizationMessageCommand.d.ts +22 -0
- package/dist-types/commands/GetAccessKeyInfoCommand.d.ts +1 -0
- package/dist-types/commands/GetCallerIdentityCommand.d.ts +49 -0
- package/dist-types/commands/GetFederationTokenCommand.d.ts +61 -0
- package/dist-types/commands/GetSessionTokenCommand.d.ts +31 -0
- package/package.json +29 -29
|
@@ -116,6 +116,80 @@ export interface AssumeRoleCommandOutput extends AssumeRoleResponse, __MetadataB
|
|
|
116
116
|
* @see {@link AssumeRoleCommandOutput} for command's `response` shape.
|
|
117
117
|
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
118
118
|
*
|
|
119
|
+
* @throws {@link ExpiredTokenException} (client fault)
|
|
120
|
+
* <p>The web identity token that was passed is expired or is not valid. Get a new identity
|
|
121
|
+
* token from the identity provider and then retry the request.</p>
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link MalformedPolicyDocumentException} (client fault)
|
|
124
|
+
* <p>The request was rejected because the policy document was malformed. The error message
|
|
125
|
+
* describes the specific error.</p>
|
|
126
|
+
*
|
|
127
|
+
* @throws {@link PackedPolicyTooLargeException} (client fault)
|
|
128
|
+
* <p>The request was rejected because the total packed size of the session policies and
|
|
129
|
+
* session tags combined was too large. An Amazon Web Services conversion compresses the session policy
|
|
130
|
+
* document, session policy ARNs, and session tags into a packed binary format that has a
|
|
131
|
+
* separate limit. The error message indicates by percentage how close the policies and
|
|
132
|
+
* 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
|
|
133
|
+
* the <i>IAM User Guide</i>.</p>
|
|
134
|
+
* <p>You could receive this error even though you meet other defined session policy and
|
|
135
|
+
* 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
|
|
136
|
+
* Character Limits</a> in the <i>IAM User Guide</i>.</p>
|
|
137
|
+
*
|
|
138
|
+
* @throws {@link RegionDisabledException} (client fault)
|
|
139
|
+
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
140
|
+
* generate credentials. The account administrator must use the IAM console to activate STS
|
|
141
|
+
* 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
|
|
142
|
+
* Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>IAM User
|
|
143
|
+
* Guide</i>.</p>
|
|
144
|
+
*
|
|
145
|
+
*
|
|
146
|
+
* @example To assume a role
|
|
147
|
+
* ```javascript
|
|
148
|
+
* //
|
|
149
|
+
* const input = {
|
|
150
|
+
* "ExternalId": "123ABC",
|
|
151
|
+
* "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
|
|
152
|
+
* "RoleArn": "arn:aws:iam::123456789012:role/demo",
|
|
153
|
+
* "RoleSessionName": "testAssumeRoleSession",
|
|
154
|
+
* "Tags": [
|
|
155
|
+
* {
|
|
156
|
+
* "Key": "Project",
|
|
157
|
+
* "Value": "Unicorn"
|
|
158
|
+
* },
|
|
159
|
+
* {
|
|
160
|
+
* "Key": "Team",
|
|
161
|
+
* "Value": "Automation"
|
|
162
|
+
* },
|
|
163
|
+
* {
|
|
164
|
+
* "Key": "Cost-Center",
|
|
165
|
+
* "Value": "12345"
|
|
166
|
+
* }
|
|
167
|
+
* ],
|
|
168
|
+
* "TransitiveTagKeys": [
|
|
169
|
+
* "Project",
|
|
170
|
+
* "Cost-Center"
|
|
171
|
+
* ]
|
|
172
|
+
* };
|
|
173
|
+
* const command = new AssumeRoleCommand(input);
|
|
174
|
+
* const response = await client.send(command);
|
|
175
|
+
* /* response ==
|
|
176
|
+
* {
|
|
177
|
+
* "AssumedRoleUser": {
|
|
178
|
+
* "Arn": "arn:aws:sts::123456789012:assumed-role/demo/Bob",
|
|
179
|
+
* "AssumedRoleId": "ARO123EXAMPLE123:Bob"
|
|
180
|
+
* },
|
|
181
|
+
* "Credentials": {
|
|
182
|
+
* "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
|
|
183
|
+
* "Expiration": "2011-07-15T23:28:33.359Z",
|
|
184
|
+
* "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
|
|
185
|
+
* "SessionToken": "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA=="
|
|
186
|
+
* },
|
|
187
|
+
* "PackedPolicySize": 8
|
|
188
|
+
* }
|
|
189
|
+
* *\/
|
|
190
|
+
* // example id: to-assume-a-role-1480532402212
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
119
193
|
*/
|
|
120
194
|
export declare class AssumeRoleCommand extends $Command<AssumeRoleCommandInput, AssumeRoleCommandOutput, STSClientResolvedConfig> {
|
|
121
195
|
readonly input: AssumeRoleCommandInput;
|
|
@@ -157,6 +157,77 @@ export interface AssumeRoleWithSAMLCommandOutput extends AssumeRoleWithSAMLRespo
|
|
|
157
157
|
* @see {@link AssumeRoleWithSAMLCommandOutput} for command's `response` shape.
|
|
158
158
|
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
159
159
|
*
|
|
160
|
+
* @throws {@link ExpiredTokenException} (client fault)
|
|
161
|
+
* <p>The web identity token that was passed is expired or is not valid. Get a new identity
|
|
162
|
+
* token from the identity provider and then retry the request.</p>
|
|
163
|
+
*
|
|
164
|
+
* @throws {@link IDPRejectedClaimException} (client fault)
|
|
165
|
+
* <p>The identity provider (IdP) reported that authentication failed. This might be because
|
|
166
|
+
* the claim is invalid.</p>
|
|
167
|
+
* <p>If this error is returned for the <code>AssumeRoleWithWebIdentity</code> operation, it
|
|
168
|
+
* can also mean that the claim has expired or has been explicitly revoked. </p>
|
|
169
|
+
*
|
|
170
|
+
* @throws {@link InvalidIdentityTokenException} (client fault)
|
|
171
|
+
* <p>The web identity token that was passed could not be validated by Amazon Web Services. Get a new
|
|
172
|
+
* identity token from the identity provider and then retry the request.</p>
|
|
173
|
+
*
|
|
174
|
+
* @throws {@link MalformedPolicyDocumentException} (client fault)
|
|
175
|
+
* <p>The request was rejected because the policy document was malformed. The error message
|
|
176
|
+
* describes the specific error.</p>
|
|
177
|
+
*
|
|
178
|
+
* @throws {@link PackedPolicyTooLargeException} (client fault)
|
|
179
|
+
* <p>The request was rejected because the total packed size of the session policies and
|
|
180
|
+
* session tags combined was too large. An Amazon Web Services conversion compresses the session policy
|
|
181
|
+
* document, session policy ARNs, and session tags into a packed binary format that has a
|
|
182
|
+
* separate limit. The error message indicates by percentage how close the policies and
|
|
183
|
+
* 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
|
|
184
|
+
* the <i>IAM User Guide</i>.</p>
|
|
185
|
+
* <p>You could receive this error even though you meet other defined session policy and
|
|
186
|
+
* 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
|
|
187
|
+
* Character Limits</a> in the <i>IAM User Guide</i>.</p>
|
|
188
|
+
*
|
|
189
|
+
* @throws {@link RegionDisabledException} (client fault)
|
|
190
|
+
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
191
|
+
* generate credentials. The account administrator must use the IAM console to activate STS
|
|
192
|
+
* 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
|
|
193
|
+
* Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>IAM User
|
|
194
|
+
* Guide</i>.</p>
|
|
195
|
+
*
|
|
196
|
+
*
|
|
197
|
+
* @example To assume a role using a SAML assertion
|
|
198
|
+
* ```javascript
|
|
199
|
+
* //
|
|
200
|
+
* const input = {
|
|
201
|
+
* "DurationSeconds": 3600,
|
|
202
|
+
* "PrincipalArn": "arn:aws:iam::123456789012:saml-provider/SAML-test",
|
|
203
|
+
* "RoleArn": "arn:aws:iam::123456789012:role/TestSaml",
|
|
204
|
+
* "SAMLAssertion": "VERYLONGENCODEDASSERTIONEXAMPLExzYW1sOkF1ZGllbmNlPmJsYW5rPC9zYW1sOkF1ZGllbmNlPjwvc2FtbDpBdWRpZW5jZVJlc3RyaWN0aW9uPjwvc2FtbDpDb25kaXRpb25zPjxzYW1sOlN1YmplY3Q+PHNhbWw6TmFtZUlEIEZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOm5hbWVpZC1mb3JtYXQ6dHJhbnNpZW50Ij5TYW1sRXhhbXBsZTwvc2FtbDpOYW1lSUQ+PHNhbWw6U3ViamVjdENvbmZpcm1hdGlvbiBNZXRob2Q9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpjbTpiZWFyZXIiPjxzYW1sOlN1YmplY3RDb25maXJtYXRpb25EYXRhIE5vdE9uT3JBZnRlcj0iMjAxOS0xMS0wMVQyMDoyNTowNS4xNDVaIiBSZWNpcGllbnQ9Imh0dHBzOi8vc2lnbmluLmF3cy5hbWF6b24uY29tL3NhbWwiLz48L3NhbWw6U3ViamVjdENvbmZpcm1hdGlvbj48L3NhbWw6U3ViamVjdD48c2FtbDpBdXRoblN0YXRlbWVudCBBdXRoPD94bWwgdmpSZXNwb25zZT4="
|
|
205
|
+
* };
|
|
206
|
+
* const command = new AssumeRoleWithSAMLCommand(input);
|
|
207
|
+
* const response = await client.send(command);
|
|
208
|
+
* /* response ==
|
|
209
|
+
* {
|
|
210
|
+
* "AssumedRoleUser": {
|
|
211
|
+
* "Arn": "arn:aws:sts::123456789012:assumed-role/TestSaml",
|
|
212
|
+
* "AssumedRoleId": "ARO456EXAMPLE789:TestSaml"
|
|
213
|
+
* },
|
|
214
|
+
* "Audience": "https://signin.aws.amazon.com/saml",
|
|
215
|
+
* "Credentials": {
|
|
216
|
+
* "AccessKeyId": "ASIAV3ZUEFP6EXAMPLE",
|
|
217
|
+
* "Expiration": "2019-11-01T20:26:47Z",
|
|
218
|
+
* "SecretAccessKey": "8P+SQvWIuLnKhh8d++jpw0nNmQRBZvNEXAMPLEKEY",
|
|
219
|
+
* "SessionToken": "IQoJb3JpZ2luX2VjEOz////////////////////wEXAMPLEtMSJHMEUCIDoKK3JH9uGQE1z0sINr5M4jk+Na8KHDcCYRVjJCZEvOAiEA3OvJGtw1EcViOleS2vhs8VdCKFJQWPQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA=="
|
|
220
|
+
* },
|
|
221
|
+
* "Issuer": "https://integ.example.com/idp/shibboleth",
|
|
222
|
+
* "NameQualifier": "SbdGOnUkh1i4+EXAMPLExL/jEvs=",
|
|
223
|
+
* "PackedPolicySize": 6,
|
|
224
|
+
* "Subject": "SamlExample",
|
|
225
|
+
* "SubjectType": "transient"
|
|
226
|
+
* }
|
|
227
|
+
* *\/
|
|
228
|
+
* // example id: to-assume-role-with-saml-14882749597814
|
|
229
|
+
* ```
|
|
230
|
+
*
|
|
160
231
|
*/
|
|
161
232
|
export declare class AssumeRoleWithSAMLCommand extends $Command<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput, STSClientResolvedConfig> {
|
|
162
233
|
readonly input: AssumeRoleWithSAMLCommandInput;
|
|
@@ -161,6 +161,84 @@ export interface AssumeRoleWithWebIdentityCommandOutput extends AssumeRoleWithWe
|
|
|
161
161
|
* @see {@link AssumeRoleWithWebIdentityCommandOutput} for command's `response` shape.
|
|
162
162
|
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
163
163
|
*
|
|
164
|
+
* @throws {@link ExpiredTokenException} (client fault)
|
|
165
|
+
* <p>The web identity token that was passed is expired or is not valid. Get a new identity
|
|
166
|
+
* token from the identity provider and then retry the request.</p>
|
|
167
|
+
*
|
|
168
|
+
* @throws {@link IDPCommunicationErrorException} (client fault)
|
|
169
|
+
* <p>The request could not be fulfilled because the identity provider (IDP) that
|
|
170
|
+
* was asked to verify the incoming identity token could not be reached. This is often a
|
|
171
|
+
* transient error caused by network conditions. Retry the request a limited number of
|
|
172
|
+
* times so that you don't exceed the request rate. If the error persists, the
|
|
173
|
+
* identity provider might be down or not responding.</p>
|
|
174
|
+
*
|
|
175
|
+
* @throws {@link IDPRejectedClaimException} (client fault)
|
|
176
|
+
* <p>The identity provider (IdP) reported that authentication failed. This might be because
|
|
177
|
+
* the claim is invalid.</p>
|
|
178
|
+
* <p>If this error is returned for the <code>AssumeRoleWithWebIdentity</code> operation, it
|
|
179
|
+
* can also mean that the claim has expired or has been explicitly revoked. </p>
|
|
180
|
+
*
|
|
181
|
+
* @throws {@link InvalidIdentityTokenException} (client fault)
|
|
182
|
+
* <p>The web identity token that was passed could not be validated by Amazon Web Services. Get a new
|
|
183
|
+
* identity token from the identity provider and then retry the request.</p>
|
|
184
|
+
*
|
|
185
|
+
* @throws {@link MalformedPolicyDocumentException} (client fault)
|
|
186
|
+
* <p>The request was rejected because the policy document was malformed. The error message
|
|
187
|
+
* describes the specific error.</p>
|
|
188
|
+
*
|
|
189
|
+
* @throws {@link PackedPolicyTooLargeException} (client fault)
|
|
190
|
+
* <p>The request was rejected because the total packed size of the session policies and
|
|
191
|
+
* session tags combined was too large. An Amazon Web Services conversion compresses the session policy
|
|
192
|
+
* document, session policy ARNs, and session tags into a packed binary format that has a
|
|
193
|
+
* separate limit. The error message indicates by percentage how close the policies and
|
|
194
|
+
* 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
|
|
195
|
+
* the <i>IAM User Guide</i>.</p>
|
|
196
|
+
* <p>You could receive this error even though you meet other defined session policy and
|
|
197
|
+
* 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
|
|
198
|
+
* Character Limits</a> in the <i>IAM User Guide</i>.</p>
|
|
199
|
+
*
|
|
200
|
+
* @throws {@link RegionDisabledException} (client fault)
|
|
201
|
+
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
202
|
+
* generate credentials. The account administrator must use the IAM console to activate STS
|
|
203
|
+
* 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
|
|
204
|
+
* Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>IAM User
|
|
205
|
+
* Guide</i>.</p>
|
|
206
|
+
*
|
|
207
|
+
*
|
|
208
|
+
* @example To assume a role as an OpenID Connect-federated user
|
|
209
|
+
* ```javascript
|
|
210
|
+
* //
|
|
211
|
+
* const input = {
|
|
212
|
+
* "DurationSeconds": 3600,
|
|
213
|
+
* "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
|
|
214
|
+
* "ProviderId": "www.amazon.com",
|
|
215
|
+
* "RoleArn": "arn:aws:iam::123456789012:role/FederatedWebIdentityRole",
|
|
216
|
+
* "RoleSessionName": "app1",
|
|
217
|
+
* "WebIdentityToken": "Atza%7CIQEBLjAsAhRFiXuWpUXuRvQ9PZL3GMFcYevydwIUFAHZwXZXXXXXXXXJnrulxKDHwy87oGKPznh0D6bEQZTSCzyoCtL_8S07pLpr0zMbn6w1lfVZKNTBdDansFBmtGnIsIapjI6xKR02Yc_2bQ8LZbUXSGm6Ry6_BG7PrtLZtj_dfCTj92xNGed-CrKqjG7nPBjNIL016GGvuS5gSvPRUxWES3VYfm1wl7WTI7jn-Pcb6M-buCgHhFOzTQxod27L9CqnOLio7N3gZAGpsp6n1-AJBOCJckcyXe2c6uD0srOJeZlKUm2eTDVMf8IehDVI0r1QOnTV6KzzAI3OY87Vd_cVMQ"
|
|
218
|
+
* };
|
|
219
|
+
* const command = new AssumeRoleWithWebIdentityCommand(input);
|
|
220
|
+
* const response = await client.send(command);
|
|
221
|
+
* /* response ==
|
|
222
|
+
* {
|
|
223
|
+
* "AssumedRoleUser": {
|
|
224
|
+
* "Arn": "arn:aws:sts::123456789012:assumed-role/FederatedWebIdentityRole/app1",
|
|
225
|
+
* "AssumedRoleId": "AROACLKWSDQRAOEXAMPLE:app1"
|
|
226
|
+
* },
|
|
227
|
+
* "Audience": "client.5498841531868486423.1548@apps.example.com",
|
|
228
|
+
* "Credentials": {
|
|
229
|
+
* "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
|
|
230
|
+
* "Expiration": "2014-10-24T23:00:23Z",
|
|
231
|
+
* "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
|
|
232
|
+
* "SessionToken": "AQoDYXdzEE0a8ANXXXXXXXXNO1ewxE5TijQyp+IEXAMPLE"
|
|
233
|
+
* },
|
|
234
|
+
* "PackedPolicySize": 123,
|
|
235
|
+
* "Provider": "www.amazon.com",
|
|
236
|
+
* "SubjectFromWebIdentityToken": "amzn1.account.AF6RHO7KZU5XRVQJGXK6HEXAMPLE"
|
|
237
|
+
* }
|
|
238
|
+
* *\/
|
|
239
|
+
* // example id: to-assume-a-role-as-an-openid-connect-federated-user-1480533445696
|
|
240
|
+
* ```
|
|
241
|
+
*
|
|
164
242
|
*/
|
|
165
243
|
export declare class AssumeRoleWithWebIdentityCommand extends $Command<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput, STSClientResolvedConfig> {
|
|
166
244
|
readonly input: AssumeRoleWithWebIdentityCommandInput;
|
|
@@ -64,6 +64,28 @@ export interface DecodeAuthorizationMessageCommandOutput extends DecodeAuthoriza
|
|
|
64
64
|
* @see {@link DecodeAuthorizationMessageCommandOutput} for command's `response` shape.
|
|
65
65
|
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
66
66
|
*
|
|
67
|
+
* @throws {@link InvalidAuthorizationMessageException} (client fault)
|
|
68
|
+
* <p>The error returned if the message passed to <code>DecodeAuthorizationMessage</code>
|
|
69
|
+
* was invalid. This can happen if the token contains invalid characters, such as
|
|
70
|
+
* linebreaks. </p>
|
|
71
|
+
*
|
|
72
|
+
*
|
|
73
|
+
* @example To decode information about an authorization status of a request
|
|
74
|
+
* ```javascript
|
|
75
|
+
* //
|
|
76
|
+
* const input = {
|
|
77
|
+
* "EncodedMessage": "<encoded-message>"
|
|
78
|
+
* };
|
|
79
|
+
* const command = new DecodeAuthorizationMessageCommand(input);
|
|
80
|
+
* const response = await client.send(command);
|
|
81
|
+
* /* response ==
|
|
82
|
+
* {
|
|
83
|
+
* "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 ...)]}}"
|
|
84
|
+
* }
|
|
85
|
+
* *\/
|
|
86
|
+
* // example id: to-decode-information-about-an-authorization-status-of-a-request-1480533854499
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
67
89
|
*/
|
|
68
90
|
export declare class DecodeAuthorizationMessageCommand extends $Command<DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput, STSClientResolvedConfig> {
|
|
69
91
|
readonly input: DecodeAuthorizationMessageCommandInput;
|
|
@@ -46,6 +46,7 @@ export interface GetAccessKeyInfoCommandOutput extends GetAccessKeyInfoResponse,
|
|
|
46
46
|
* @see {@link GetAccessKeyInfoCommandOutput} for command's `response` shape.
|
|
47
47
|
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
48
48
|
*
|
|
49
|
+
*
|
|
49
50
|
*/
|
|
50
51
|
export declare class GetAccessKeyInfoCommand extends $Command<GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput, STSClientResolvedConfig> {
|
|
51
52
|
readonly input: GetAccessKeyInfoCommandInput;
|
|
@@ -38,6 +38,55 @@ export interface GetCallerIdentityCommandOutput extends GetCallerIdentityRespons
|
|
|
38
38
|
* @see {@link GetCallerIdentityCommandOutput} for command's `response` shape.
|
|
39
39
|
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
40
40
|
*
|
|
41
|
+
*
|
|
42
|
+
* @example To get details about a calling IAM user
|
|
43
|
+
* ```javascript
|
|
44
|
+
* // This example shows a request and response made with the credentials for a user named Alice in the AWS account 123456789012.
|
|
45
|
+
* const input = {};
|
|
46
|
+
* const command = new GetCallerIdentityCommand(input);
|
|
47
|
+
* const response = await client.send(command);
|
|
48
|
+
* /* response ==
|
|
49
|
+
* {
|
|
50
|
+
* "Account": "123456789012",
|
|
51
|
+
* "Arn": "arn:aws:iam::123456789012:user/Alice",
|
|
52
|
+
* "UserId": "AKIAI44QH8DHBEXAMPLE"
|
|
53
|
+
* }
|
|
54
|
+
* *\/
|
|
55
|
+
* // example id: to-get-details-about-a-calling-iam-user-1480540050376
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @example To get details about a calling user federated with AssumeRole
|
|
59
|
+
* ```javascript
|
|
60
|
+
* // 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.
|
|
61
|
+
* const input = {};
|
|
62
|
+
* const command = new GetCallerIdentityCommand(input);
|
|
63
|
+
* const response = await client.send(command);
|
|
64
|
+
* /* response ==
|
|
65
|
+
* {
|
|
66
|
+
* "Account": "123456789012",
|
|
67
|
+
* "Arn": "arn:aws:sts::123456789012:assumed-role/my-role-name/my-role-session-name",
|
|
68
|
+
* "UserId": "AKIAI44QH8DHBEXAMPLE:my-role-session-name"
|
|
69
|
+
* }
|
|
70
|
+
* *\/
|
|
71
|
+
* // example id: to-get-details-about-a-calling-user-federated-with-assumerole-1480540158545
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @example To get details about a calling user federated with GetFederationToken
|
|
75
|
+
* ```javascript
|
|
76
|
+
* // 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.
|
|
77
|
+
* const input = {};
|
|
78
|
+
* const command = new GetCallerIdentityCommand(input);
|
|
79
|
+
* const response = await client.send(command);
|
|
80
|
+
* /* response ==
|
|
81
|
+
* {
|
|
82
|
+
* "Account": "123456789012",
|
|
83
|
+
* "Arn": "arn:aws:sts::123456789012:federated-user/my-federated-user-name",
|
|
84
|
+
* "UserId": "123456789012:my-federated-user-name"
|
|
85
|
+
* }
|
|
86
|
+
* *\/
|
|
87
|
+
* // example id: to-get-details-about-a-calling-user-federated-with-getfederationtoken-1480540231316
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
41
90
|
*/
|
|
42
91
|
export declare class GetCallerIdentityCommand extends $Command<GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput, STSClientResolvedConfig> {
|
|
43
92
|
readonly input: GetCallerIdentityCommandInput;
|
|
@@ -115,6 +115,67 @@ export interface GetFederationTokenCommandOutput extends GetFederationTokenRespo
|
|
|
115
115
|
* @see {@link GetFederationTokenCommandOutput} for command's `response` shape.
|
|
116
116
|
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
117
117
|
*
|
|
118
|
+
* @throws {@link MalformedPolicyDocumentException} (client fault)
|
|
119
|
+
* <p>The request was rejected because the policy document was malformed. The error message
|
|
120
|
+
* describes the specific error.</p>
|
|
121
|
+
*
|
|
122
|
+
* @throws {@link PackedPolicyTooLargeException} (client fault)
|
|
123
|
+
* <p>The request was rejected because the total packed size of the session policies and
|
|
124
|
+
* session tags combined was too large. An Amazon Web Services conversion compresses the session policy
|
|
125
|
+
* document, session policy ARNs, and session tags into a packed binary format that has a
|
|
126
|
+
* separate limit. The error message indicates by percentage how close the policies and
|
|
127
|
+
* 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
|
|
128
|
+
* the <i>IAM User Guide</i>.</p>
|
|
129
|
+
* <p>You could receive this error even though you meet other defined session policy and
|
|
130
|
+
* 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
|
|
131
|
+
* Character Limits</a> in the <i>IAM User Guide</i>.</p>
|
|
132
|
+
*
|
|
133
|
+
* @throws {@link RegionDisabledException} (client fault)
|
|
134
|
+
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
135
|
+
* generate credentials. The account administrator must use the IAM console to activate STS
|
|
136
|
+
* 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
|
|
137
|
+
* Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>IAM User
|
|
138
|
+
* Guide</i>.</p>
|
|
139
|
+
*
|
|
140
|
+
*
|
|
141
|
+
* @example To get temporary credentials for a role by using GetFederationToken
|
|
142
|
+
* ```javascript
|
|
143
|
+
* //
|
|
144
|
+
* const input = {
|
|
145
|
+
* "DurationSeconds": 3600,
|
|
146
|
+
* "Name": "testFedUserSession",
|
|
147
|
+
* "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
|
|
148
|
+
* "Tags": [
|
|
149
|
+
* {
|
|
150
|
+
* "Key": "Project",
|
|
151
|
+
* "Value": "Pegasus"
|
|
152
|
+
* },
|
|
153
|
+
* {
|
|
154
|
+
* "Key": "Cost-Center",
|
|
155
|
+
* "Value": "98765"
|
|
156
|
+
* }
|
|
157
|
+
* ]
|
|
158
|
+
* };
|
|
159
|
+
* const command = new GetFederationTokenCommand(input);
|
|
160
|
+
* const response = await client.send(command);
|
|
161
|
+
* /* response ==
|
|
162
|
+
* {
|
|
163
|
+
* "Credentials": {
|
|
164
|
+
* "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
|
|
165
|
+
* "Expiration": "2011-07-15T23:28:33.359Z",
|
|
166
|
+
* "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
|
|
167
|
+
* "SessionToken": "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA=="
|
|
168
|
+
* },
|
|
169
|
+
* "FederatedUser": {
|
|
170
|
+
* "Arn": "arn:aws:sts::123456789012:federated-user/Bob",
|
|
171
|
+
* "FederatedUserId": "123456789012:Bob"
|
|
172
|
+
* },
|
|
173
|
+
* "PackedPolicySize": 8
|
|
174
|
+
* }
|
|
175
|
+
* *\/
|
|
176
|
+
* // example id: to-get-temporary-credentials-for-a-role-by-using-getfederationtoken-1480540749900
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
118
179
|
*/
|
|
119
180
|
export declare class GetFederationTokenCommand extends $Command<GetFederationTokenCommandInput, GetFederationTokenCommandOutput, STSClientResolvedConfig> {
|
|
120
181
|
readonly input: GetFederationTokenCommandInput;
|
|
@@ -87,6 +87,37 @@ export interface GetSessionTokenCommandOutput extends GetSessionTokenResponse, _
|
|
|
87
87
|
* @see {@link GetSessionTokenCommandOutput} for command's `response` shape.
|
|
88
88
|
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
89
89
|
*
|
|
90
|
+
* @throws {@link RegionDisabledException} (client fault)
|
|
91
|
+
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
92
|
+
* generate credentials. The account administrator must use the IAM console to activate STS
|
|
93
|
+
* 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
|
|
94
|
+
* Deactivating Amazon Web Services STS in an Amazon Web Services Region</a> in the <i>IAM User
|
|
95
|
+
* Guide</i>.</p>
|
|
96
|
+
*
|
|
97
|
+
*
|
|
98
|
+
* @example To get temporary credentials for an IAM user or an AWS account
|
|
99
|
+
* ```javascript
|
|
100
|
+
* //
|
|
101
|
+
* const input = {
|
|
102
|
+
* "DurationSeconds": 3600,
|
|
103
|
+
* "SerialNumber": "YourMFASerialNumber",
|
|
104
|
+
* "TokenCode": "123456"
|
|
105
|
+
* };
|
|
106
|
+
* const command = new GetSessionTokenCommand(input);
|
|
107
|
+
* const response = await client.send(command);
|
|
108
|
+
* /* response ==
|
|
109
|
+
* {
|
|
110
|
+
* "Credentials": {
|
|
111
|
+
* "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
|
|
112
|
+
* "Expiration": "2011-07-11T19:55:29.611Z",
|
|
113
|
+
* "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
|
|
114
|
+
* "SessionToken": "AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/LTo6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3zrkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtpZ3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE"
|
|
115
|
+
* }
|
|
116
|
+
* }
|
|
117
|
+
* *\/
|
|
118
|
+
* // example id: to-get-temporary-credentials-for-an-iam-user-or-an-aws-account-1480540814038
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
90
121
|
*/
|
|
91
122
|
export declare class GetSessionTokenCommand extends $Command<GetSessionTokenCommandInput, GetSessionTokenCommandOutput, STSClientResolvedConfig> {
|
|
92
123
|
readonly input: GetSessionTokenCommandInput;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sts",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.290.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -22,37 +22,37 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
24
24
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
25
|
-
"@aws-sdk/config-resolver": "3.
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
27
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
28
|
-
"@aws-sdk/hash-node": "3.
|
|
29
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
30
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
31
|
-
"@aws-sdk/middleware-endpoint": "3.
|
|
32
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
33
|
-
"@aws-sdk/middleware-logger": "3.
|
|
34
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
35
|
-
"@aws-sdk/middleware-retry": "3.
|
|
36
|
-
"@aws-sdk/middleware-sdk-sts": "3.
|
|
37
|
-
"@aws-sdk/middleware-serde": "3.
|
|
38
|
-
"@aws-sdk/middleware-signing": "3.
|
|
39
|
-
"@aws-sdk/middleware-stack": "3.
|
|
40
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
41
|
-
"@aws-sdk/node-config-provider": "3.
|
|
42
|
-
"@aws-sdk/node-http-handler": "3.
|
|
43
|
-
"@aws-sdk/protocol-http": "3.
|
|
44
|
-
"@aws-sdk/smithy-client": "3.
|
|
45
|
-
"@aws-sdk/types": "3.
|
|
46
|
-
"@aws-sdk/url-parser": "3.
|
|
25
|
+
"@aws-sdk/config-resolver": "3.290.0",
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.290.0",
|
|
27
|
+
"@aws-sdk/fetch-http-handler": "3.290.0",
|
|
28
|
+
"@aws-sdk/hash-node": "3.290.0",
|
|
29
|
+
"@aws-sdk/invalid-dependency": "3.290.0",
|
|
30
|
+
"@aws-sdk/middleware-content-length": "3.290.0",
|
|
31
|
+
"@aws-sdk/middleware-endpoint": "3.290.0",
|
|
32
|
+
"@aws-sdk/middleware-host-header": "3.290.0",
|
|
33
|
+
"@aws-sdk/middleware-logger": "3.290.0",
|
|
34
|
+
"@aws-sdk/middleware-recursion-detection": "3.290.0",
|
|
35
|
+
"@aws-sdk/middleware-retry": "3.290.0",
|
|
36
|
+
"@aws-sdk/middleware-sdk-sts": "3.290.0",
|
|
37
|
+
"@aws-sdk/middleware-serde": "3.290.0",
|
|
38
|
+
"@aws-sdk/middleware-signing": "3.290.0",
|
|
39
|
+
"@aws-sdk/middleware-stack": "3.290.0",
|
|
40
|
+
"@aws-sdk/middleware-user-agent": "3.290.0",
|
|
41
|
+
"@aws-sdk/node-config-provider": "3.290.0",
|
|
42
|
+
"@aws-sdk/node-http-handler": "3.290.0",
|
|
43
|
+
"@aws-sdk/protocol-http": "3.290.0",
|
|
44
|
+
"@aws-sdk/smithy-client": "3.290.0",
|
|
45
|
+
"@aws-sdk/types": "3.290.0",
|
|
46
|
+
"@aws-sdk/url-parser": "3.290.0",
|
|
47
47
|
"@aws-sdk/util-base64": "3.208.0",
|
|
48
48
|
"@aws-sdk/util-body-length-browser": "3.188.0",
|
|
49
49
|
"@aws-sdk/util-body-length-node": "3.208.0",
|
|
50
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
51
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
52
|
-
"@aws-sdk/util-endpoints": "3.
|
|
53
|
-
"@aws-sdk/util-retry": "3.
|
|
54
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
55
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
50
|
+
"@aws-sdk/util-defaults-mode-browser": "3.290.0",
|
|
51
|
+
"@aws-sdk/util-defaults-mode-node": "3.290.0",
|
|
52
|
+
"@aws-sdk/util-endpoints": "3.290.0",
|
|
53
|
+
"@aws-sdk/util-retry": "3.290.0",
|
|
54
|
+
"@aws-sdk/util-user-agent-browser": "3.290.0",
|
|
55
|
+
"@aws-sdk/util-user-agent-node": "3.290.0",
|
|
56
56
|
"@aws-sdk/util-utf8": "3.254.0",
|
|
57
57
|
"fast-xml-parser": "4.1.2",
|
|
58
58
|
"tslib": "^2.3.1"
|