@aws-sdk/client-sts 3.370.0 → 3.377.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.
@@ -522,6 +522,16 @@ const se_AssumeRoleRequest = (input, context) => {
522
522
  if (input.SourceIdentity != null) {
523
523
  entries["SourceIdentity"] = input.SourceIdentity;
524
524
  }
525
+ if (input.ProvidedContexts != null) {
526
+ const memberEntries = se_ProvidedContextsListType(input.ProvidedContexts, context);
527
+ if (input.ProvidedContexts?.length === 0) {
528
+ entries.ProvidedContexts = [];
529
+ }
530
+ Object.entries(memberEntries).forEach(([key, value]) => {
531
+ const loc = `ProvidedContexts.${key}`;
532
+ entries[loc] = value;
533
+ });
534
+ }
525
535
  return entries;
526
536
  };
527
537
  const se_AssumeRoleWithSAMLRequest = (input, context) => {
@@ -671,6 +681,31 @@ const se_PolicyDescriptorType = (input, context) => {
671
681
  }
672
682
  return entries;
673
683
  };
684
+ const se_ProvidedContext = (input, context) => {
685
+ const entries = {};
686
+ if (input.ProviderArn != null) {
687
+ entries["ProviderArn"] = input.ProviderArn;
688
+ }
689
+ if (input.ContextAssertion != null) {
690
+ entries["ContextAssertion"] = input.ContextAssertion;
691
+ }
692
+ return entries;
693
+ };
694
+ const se_ProvidedContextsListType = (input, context) => {
695
+ const entries = {};
696
+ let counter = 1;
697
+ for (const entry of input) {
698
+ if (entry === null) {
699
+ continue;
700
+ }
701
+ const memberEntries = se_ProvidedContext(entry, context);
702
+ Object.entries(memberEntries).forEach(([key, value]) => {
703
+ entries[`member.${counter}.${key}`] = value;
704
+ });
705
+ counter++;
706
+ }
707
+ return entries;
708
+ };
674
709
  const se_Tag = (input, context) => {
675
710
  const entries = {};
676
711
  if (input.Key != null) {
@@ -503,6 +503,16 @@ const se_AssumeRoleRequest = (input, context) => {
503
503
  if (input.SourceIdentity != null) {
504
504
  entries["SourceIdentity"] = input.SourceIdentity;
505
505
  }
506
+ if (input.ProvidedContexts != null) {
507
+ const memberEntries = se_ProvidedContextsListType(input.ProvidedContexts, context);
508
+ if (input.ProvidedContexts?.length === 0) {
509
+ entries.ProvidedContexts = [];
510
+ }
511
+ Object.entries(memberEntries).forEach(([key, value]) => {
512
+ const loc = `ProvidedContexts.${key}`;
513
+ entries[loc] = value;
514
+ });
515
+ }
506
516
  return entries;
507
517
  };
508
518
  const se_AssumeRoleWithSAMLRequest = (input, context) => {
@@ -652,6 +662,31 @@ const se_PolicyDescriptorType = (input, context) => {
652
662
  }
653
663
  return entries;
654
664
  };
665
+ const se_ProvidedContext = (input, context) => {
666
+ const entries = {};
667
+ if (input.ProviderArn != null) {
668
+ entries["ProviderArn"] = input.ProviderArn;
669
+ }
670
+ if (input.ContextAssertion != null) {
671
+ entries["ContextAssertion"] = input.ContextAssertion;
672
+ }
673
+ return entries;
674
+ };
675
+ const se_ProvidedContextsListType = (input, context) => {
676
+ const entries = {};
677
+ let counter = 1;
678
+ for (const entry of input) {
679
+ if (entry === null) {
680
+ continue;
681
+ }
682
+ const memberEntries = se_ProvidedContext(entry, context);
683
+ Object.entries(memberEntries).forEach(([key, value]) => {
684
+ entries[`member.${counter}.${key}`] = value;
685
+ });
686
+ counter++;
687
+ }
688
+ return entries;
689
+ };
655
690
  const se_Tag = (input, context) => {
656
691
  const entries = {};
657
692
  if (input.Key != null) {
@@ -58,8 +58,8 @@ export interface AssumeRoleCommandOutput extends AssumeRoleResponse, __MetadataB
58
58
  * created. That trust policy states which accounts are allowed to delegate that access to
59
59
  * users in the account. </p>
60
60
  * <p>A user who wants to access a role in a different account must also have permissions that
61
- * are delegated from the account administrator. The administrator must attach a policy
62
- * that allows the user to call <code>AssumeRole</code> for the ARN of the role in the other
61
+ * are delegated from the account administrator. The administrator must attach a policy that
62
+ * allows the user to call <code>AssumeRole</code> for the ARN of the role in the other
63
63
  * account.</p>
64
64
  * <p>To allow a user to assume a role in the same account, you can do either of the
65
65
  * following:</p>
@@ -140,6 +140,12 @@ export interface AssumeRoleCommandOutput extends AssumeRoleResponse, __MetadataB
140
140
  * SerialNumber: "STRING_VALUE",
141
141
  * TokenCode: "STRING_VALUE",
142
142
  * SourceIdentity: "STRING_VALUE",
143
+ * ProvidedContexts: [ // ProvidedContextsListType
144
+ * { // ProvidedContext
145
+ * ProviderArn: "STRING_VALUE",
146
+ * ContextAssertion: "STRING_VALUE",
147
+ * },
148
+ * ],
143
149
  * };
144
150
  * const command = new AssumeRoleCommand(input);
145
151
  * const response = await client.send(command);
@@ -32,8 +32,8 @@ export interface AssumeRoleWithWebIdentityCommandOutput extends AssumeRoleWithWe
32
32
  * <a href="http://aws.amazon.com/sdkforios/">Amazon Web Services SDK for iOS Developer Guide</a> and the <a href="http://aws.amazon.com/sdkforandroid/">Amazon Web Services SDK for Android Developer Guide</a> to uniquely
33
33
  * identify a user. You can also supply the user with a consistent identity throughout the
34
34
  * lifetime of an application.</p>
35
- * <p>To learn more about Amazon Cognito, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html">Amazon Cognito identity pools</a> in
36
- * <i>Amazon Cognito Developer Guide</i>.</p>
35
+ * <p>To learn more about Amazon Cognito, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html">Amazon Cognito identity
36
+ * pools</a> in <i>Amazon Cognito Developer Guide</i>.</p>
37
37
  * </note>
38
38
  * <p>Calling <code>AssumeRoleWithWebIdentity</code> does not require the use of Amazon Web Services
39
39
  * security credentials. Therefore, you can distribute an application (for example, on mobile
@@ -31,13 +31,12 @@ export interface GetAccessKeyInfoCommandOutput extends GetAccessKeyInfoResponse,
31
31
  * Users</a> in the <i>IAM User Guide</i>.</p>
32
32
  * <p>When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services account
33
33
  * to which the keys belong. Access key IDs beginning with <code>AKIA</code> are long-term
34
- * credentials for an IAM user or the Amazon Web Services account root user. Access key IDs beginning with
35
- * <code>ASIA</code> are temporary credentials that are created using STS operations. If
36
- * the account in the response belongs to you, you can sign in as the root user and review
37
- * your root user access keys. Then, you can pull a <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html">credentials report</a> to
38
- * learn which IAM user owns the keys. To learn who requested the temporary credentials for
39
- * an <code>ASIA</code> access key, view the STS events in your <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html">CloudTrail logs</a> in the
40
- * <i>IAM User Guide</i>.</p>
34
+ * credentials for an IAM user or the Amazon Web Services account root user. Access key IDs
35
+ * beginning with <code>ASIA</code> are temporary credentials that are created using STS
36
+ * operations. If the account in the response belongs to you, you can sign in as the root user and review your root user access keys. Then, you can pull a <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html">credentials
37
+ * report</a> to learn which IAM user owns the keys. To learn who
38
+ * requested the temporary credentials for an <code>ASIA</code> access key, view the STS
39
+ * events in your <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html">CloudTrail logs</a> in the <i>IAM User Guide</i>.</p>
41
40
  * <p>This operation does not indicate the state of the access key. The key might be active,
42
41
  * inactive, or deleted. Active keys might not have permissions to perform an operation.
43
42
  * Providing a deleted access key might return an error that the key doesn't exist.</p>
@@ -23,12 +23,14 @@ export interface GetCallerIdentityCommandOutput extends GetCallerIdentityRespons
23
23
  }
24
24
  /**
25
25
  * @public
26
- * <p>Returns details about the IAM user or role whose credentials are used to call the operation.</p>
26
+ * <p>Returns details about the IAM user or role whose credentials are used to
27
+ * call the operation.</p>
27
28
  * <note>
28
- * <p>No permissions are required to perform this operation. If an administrator
29
- * attaches a policy to your identity that explicitly denies access to the
29
+ * <p>No permissions are required to perform this operation. If an administrator attaches a
30
+ * policy to your identity that explicitly denies access to the
30
31
  * <code>sts:GetCallerIdentity</code> action, you can still perform this operation.
31
- * 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
32
+ * Permissions are not required because the same information is returned when access is
33
+ * 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
32
34
  * <i>IAM User Guide</i>.</p>
33
35
  * </note>
34
36
  * @example
@@ -27,16 +27,18 @@ export interface GetFederationTokenCommandOutput extends GetFederationTokenRespo
27
27
  * secret access key, and a security token) for a user. A typical use is in a proxy
28
28
  * application that gets temporary security credentials on behalf of distributed applications
29
29
  * inside a corporate network.</p>
30
- * <p>You must call the <code>GetFederationToken</code> operation
31
- * using the long-term security credentials of an IAM user. As a result, this call is
32
- * appropriate in contexts where those credentials can be safeguarded, usually in a
33
- * server-based application. For a comparison of <code>GetFederationToken</code> with the
34
- * 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
30
+ * <p>You must call the <code>GetFederationToken</code> operation using the long-term security
31
+ * credentials of an IAM user. As a result, this call is appropriate in
32
+ * contexts where those credentials can be safeguarded, usually in a server-based application.
33
+ * For a comparison of <code>GetFederationToken</code> with the other API operations that
34
+ * produce temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
35
35
  * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
36
36
  * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
37
- * <p>Although it is possible to call <code>GetFederationToken</code> using the security credentials of an
38
- * 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
39
- * <i>IAM User Guide</i>. </p>
37
+ * <p>Although it is possible to call <code>GetFederationToken</code> using the security
38
+ * credentials of an Amazon Web Services account root user rather than an IAM user that you
39
+ * create for the purpose of a proxy application, we do not recommend it. For more
40
+ * 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
41
+ * <i>IAM User Guide</i>. </p>
40
42
  * <note>
41
43
  * <p>You can create a mobile-based or browser-based app that can authenticate users using
42
44
  * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID
@@ -49,7 +51,8 @@ export interface GetFederationTokenCommandOutput extends GetFederationTokenRespo
49
51
  * </p>
50
52
  * <p>The temporary credentials are valid for the specified duration, from 900 seconds (15
51
53
  * minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is
52
- * 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>
54
+ * 43,200 seconds (12 hours). Temporary credentials obtained by using the root user
55
+ * credentials have a maximum duration of 3,600 seconds (1 hour).</p>
53
56
  * <p>
54
57
  * <b>Permissions</b>
55
58
  * </p>
@@ -57,7 +60,8 @@ export interface GetFederationTokenCommandOutput extends GetFederationTokenRespo
57
60
  * Amazon Web Services service with the following exceptions:</p>
58
61
  * <ul>
59
62
  * <li>
60
- * <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>
63
+ * <p>You cannot call any IAM operations using the CLI or the Amazon Web Services API. This
64
+ * limitation does not apply to console sessions.</p>
61
65
  * </li>
62
66
  * <li>
63
67
  * <p>You cannot call any STS operations except <code>GetCallerIdentity</code>.</p>
@@ -71,12 +75,13 @@ export interface GetFederationTokenCommandOutput extends GetFederationTokenRespo
71
75
  * policies can't exceed 2,048 characters.</p>
72
76
  * <p>Though the session policy parameters are optional, if you do not pass a policy, then the
73
77
  * resulting federated user session has no permissions. When you pass session policies, the
74
- * session permissions are the intersection of the IAM user policies and the session
75
- * policies that you pass. This gives you a way to further restrict the permissions for a
76
- * federated user. You cannot use session policies to grant more permissions than those that
77
- * 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
78
- * Policies</a> in the <i>IAM User Guide</i>. For information about
79
- * 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>
78
+ * session permissions are the intersection of the IAM user policies and the
79
+ * session policies that you pass. This gives you a way to further restrict the permissions
80
+ * for a federated user. You cannot use session policies to grant more permissions than those
81
+ * that are defined in the permissions policy of the IAM user. For more
82
+ * information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session Policies</a> in
83
+ * the <i>IAM User Guide</i>. For information about using
84
+ * <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>
80
85
  * <p>You can use the credentials to access a resource that has a resource-based policy. If
81
86
  * that policy specifically references the federated user session in the
82
87
  * <code>Principal</code> element of the policy, the session has the permissions allowed by
@@ -23,15 +23,17 @@ export interface GetSessionTokenCommandOutput extends GetSessionTokenResponse, _
23
23
  }
24
24
  /**
25
25
  * @public
26
- * <p>Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The
27
- * credentials consist of an access key ID, a secret access key, and a security token.
26
+ * <p>Returns a set of temporary credentials for an Amazon Web Services account or IAM user.
27
+ * The credentials consist of an access key ID, a secret access key, and a security token.
28
28
  * Typically, you use <code>GetSessionToken</code> if you want to use MFA to protect
29
- * programmatic calls to specific Amazon Web Services API operations like Amazon EC2 <code>StopInstances</code>.</p>
30
- * <p>MFA-enabled IAM users must call <code>GetSessionToken</code> and submit an MFA
31
- * code that is associated with their MFA device. Using the temporary security credentials
32
- * that the call returns, IAM users can then make programmatic calls to API
33
- * 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>
34
- * 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
29
+ * programmatic calls to specific Amazon Web Services API operations like Amazon EC2
30
+ * <code>StopInstances</code>.</p>
31
+ * <p>MFA-enabled IAM users must call <code>GetSessionToken</code> and submit
32
+ * an MFA code that is associated with their MFA device. Using the temporary security
33
+ * credentials that the call returns, IAM users can then make programmatic
34
+ * calls to API operations that require MFA authentication. An incorrect MFA code causes the
35
+ * API to return an access denied error. For a comparison of <code>GetSessionToken</code> with
36
+ * 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
35
37
  * Temporary Security Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
36
38
  * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p>
37
39
  * <note>
@@ -45,8 +47,7 @@ export interface GetSessionTokenCommandOutput extends GetSessionTokenResponse, _
45
47
  * <b>Session Duration</b>
46
48
  * </p>
47
49
  * <p>The <code>GetSessionToken</code> operation must be called by using the long-term Amazon Web Services
48
- * security credentials of an IAM user. Credentials that are
49
- * created by IAM users are valid for the duration that you specify. This duration can range
50
+ * security credentials of an IAM user. Credentials that are created by IAM users are valid for the duration that you specify. This duration can range
50
51
  * from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default
51
52
  * of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900
52
53
  * seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour. </p>
@@ -65,15 +66,16 @@ export interface GetSessionTokenCommandOutput extends GetSessionTokenResponse, _
65
66
  * <code>AssumeRole</code> or <code>GetCallerIdentity</code>.</p>
66
67
  * </li>
67
68
  * </ul>
68
- * <p>The credentials that <code>GetSessionToken</code> returns are based on
69
- * permissions associated with the IAM user whose credentials were used to call the operation. The
70
- * temporary credentials have the same permissions as the IAM user.</p>
69
+ * <p>The credentials that <code>GetSessionToken</code> returns are based on permissions
70
+ * associated with the IAM user whose credentials were used to call the
71
+ * operation. The temporary credentials have the same permissions as the IAM user.</p>
71
72
  * <note>
72
- * <p>Although it is possible to call <code>GetSessionToken</code> using the security credentials of an
73
- * Amazon Web Services account root user rather than an IAM user, we do not recommend it. If
74
- * <code>GetSessionToken</code> is called using root user credentials, the
75
- * 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
76
- * <i>IAM User Guide</i>
73
+ * <p>Although it is possible to call <code>GetSessionToken</code> using the security
74
+ * credentials of an Amazon Web Services account root user rather than an IAM user, we do
75
+ * not recommend it. If <code>GetSessionToken</code> is called using root user
76
+ * credentials, the temporary credentials have root user permissions. For more
77
+ * 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
78
+ * <i>IAM User Guide</i>
77
79
  * </p>
78
80
  * </note>
79
81
  * <p>For more information about using <code>GetSessionToken</code> to create temporary
@@ -31,6 +31,20 @@ export interface PolicyDescriptorType {
31
31
  */
32
32
  arn?: string;
33
33
  }
34
+ /**
35
+ * @public
36
+ * <p>Reserved for future use.</p>
37
+ */
38
+ export interface ProvidedContext {
39
+ /**
40
+ * <p>Reserved for future use.</p>
41
+ */
42
+ ProviderArn?: string;
43
+ /**
44
+ * <p>Reserved for future use.</p>
45
+ */
46
+ ContextAssertion?: string;
47
+ }
34
48
  /**
35
49
  * @public
36
50
  * <p>You can pass custom key-value pair attributes when you assume a role or federate a user.
@@ -246,6 +260,10 @@ export interface AssumeRoleRequest {
246
260
  * <code>aws:</code>. This prefix is reserved for Amazon Web Services internal use.</p>
247
261
  */
248
262
  SourceIdentity?: string;
263
+ /**
264
+ * <p>Reserved for future use.</p>
265
+ */
266
+ ProvidedContexts?: ProvidedContext[];
249
267
  }
250
268
  /**
251
269
  * @public
@@ -612,7 +630,8 @@ export interface AssumeRoleWithWebIdentityRequest {
612
630
  * <p>The OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity
613
631
  * provider. Your application must get this token by authenticating the user who is using your
614
632
  * application with a web identity provider before the application makes an
615
- * <code>AssumeRoleWithWebIdentity</code> call. </p>
633
+ * <code>AssumeRoleWithWebIdentity</code> call. Only tokens with RSA algorithms (RS256) are
634
+ * supported.</p>
616
635
  */
617
636
  WebIdentityToken: string | undefined;
618
637
  /**
@@ -886,10 +905,10 @@ export interface GetFederationTokenRequest {
886
905
  * <p>This parameter is optional. However, if you do not pass any session policies, then the
887
906
  * resulting federated user session has no permissions.</p>
888
907
  * <p>When you pass session policies, the session permissions are the intersection of the
889
- * IAM user policies and the session policies that you pass. This gives you a way to further
890
- * restrict the permissions for a federated user. You cannot use session policies to grant
891
- * more permissions than those that are defined in the permissions policy of the IAM user.
892
- * For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session Policies</a> in
908
+ * IAM user policies and the session policies that you pass. This gives you
909
+ * a way to further restrict the permissions for a federated user. You cannot use session
910
+ * policies to grant more permissions than those that are defined in the permissions policy of
911
+ * the IAM user. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session Policies</a> in
893
912
  * the <i>IAM User Guide</i>.</p>
894
913
  * <p>The resulting credentials can be used to access a resource that has a resource-based
895
914
  * policy. If that policy specifically references the federated user session in the
@@ -912,8 +931,7 @@ export interface GetFederationTokenRequest {
912
931
  Policy?: string;
913
932
  /**
914
933
  * <p>The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as a
915
- * managed session policy. The policies must exist in the same account as the IAM user that
916
- * is requesting federated access.</p>
934
+ * managed session policy. The policies must exist in the same account as the IAM user that is requesting federated access.</p>
917
935
  * <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
918
936
  * this operation. You can pass a single JSON policy document to use as an inline session
919
937
  * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as
@@ -924,10 +942,10 @@ export interface GetFederationTokenRequest {
924
942
  * <p>This parameter is optional. However, if you do not pass any session policies, then the
925
943
  * resulting federated user session has no permissions.</p>
926
944
  * <p>When you pass session policies, the session permissions are the intersection of the
927
- * IAM user policies and the session policies that you pass. This gives you a way to further
928
- * restrict the permissions for a federated user. You cannot use session policies to grant
929
- * more permissions than those that are defined in the permissions policy of the IAM user.
930
- * For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session Policies</a> in
945
+ * IAM user policies and the session policies that you pass. This gives you
946
+ * a way to further restrict the permissions for a federated user. You cannot use session
947
+ * policies to grant more permissions than those that are defined in the permissions policy of
948
+ * the IAM user. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session Policies</a> in
931
949
  * the <i>IAM User Guide</i>.</p>
932
950
  * <p>The resulting credentials can be used to access a resource that has a resource-based
933
951
  * policy. If that policy specifically references the federated user session in the
@@ -948,8 +966,8 @@ export interface GetFederationTokenRequest {
948
966
  * federation sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours), with
949
967
  * 43,200 seconds (12 hours) as the default. Sessions obtained using root user
950
968
  * credentials are restricted to a maximum of 3,600 seconds (one hour). If the specified
951
- * duration is longer than one hour, the session obtained by using root user credentials
952
- * defaults to one hour.</p>
969
+ * duration is longer than one hour, the session obtained by using root user
970
+ * credentials defaults to one hour.</p>
953
971
  */
954
972
  DurationSeconds?: number;
955
973
  /**
@@ -1030,20 +1048,18 @@ export interface GetFederationTokenResponse {
1030
1048
  export interface GetSessionTokenRequest {
1031
1049
  /**
1032
1050
  * <p>The duration, in seconds, that the credentials should remain valid. Acceptable durations
1033
- * for IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours),
1034
- * with 43,200 seconds (12 hours) as the default. Sessions for Amazon Web Services account owners are
1035
- * restricted to a maximum of 3,600 seconds (one hour). If the duration is longer than one
1036
- * hour, the session for Amazon Web Services account owners defaults to one hour.</p>
1051
+ * for IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds
1052
+ * (36 hours), with 43,200 seconds (12 hours) as the default. Sessions for Amazon Web Services account
1053
+ * owners are restricted to a maximum of 3,600 seconds (one hour). If the duration is longer
1054
+ * than one hour, the session for Amazon Web Services account owners defaults to one hour.</p>
1037
1055
  */
1038
1056
  DurationSeconds?: number;
1039
1057
  /**
1040
- * <p>The identification number of the MFA device that is associated with the IAM user who
1041
- * is making the <code>GetSessionToken</code> call. Specify this value if the IAM user has a
1042
- * policy that requires MFA authentication. The value is either the serial number for a
1043
- * hardware device (such as <code>GAHT12345678</code>) or an Amazon Resource Name (ARN) for a
1044
- * virtual device (such as <code>arn:aws:iam::123456789012:mfa/user</code>). You can find the
1045
- * device for an IAM user by going to the Amazon Web Services Management Console and viewing the user's security
1046
- * credentials. </p>
1058
+ * <p>The identification number of the MFA device that is associated with the IAM user who is making the <code>GetSessionToken</code> call. Specify this value
1059
+ * if the IAM user has a policy that requires MFA authentication. The value is
1060
+ * either the serial number for a hardware device (such as <code>GAHT12345678</code>) or an
1061
+ * Amazon Resource Name (ARN) for a virtual device (such as
1062
+ * <code>arn:aws:iam::123456789012:mfa/user</code>). You can find the device for an IAM user by going to the Amazon Web Services Management Console and viewing the user's security credentials. </p>
1047
1063
  * <p>The regex used to validate this parameter is a string of
1048
1064
  * characters consisting of upper- and lower-case alphanumeric characters with no spaces.
1049
1065
  * You can also include underscores or any of the following characters: =,.@:/-</p>
@@ -1051,10 +1067,10 @@ export interface GetSessionTokenRequest {
1051
1067
  SerialNumber?: string;
1052
1068
  /**
1053
1069
  * <p>The value provided by the MFA device, if MFA is required. If any policy requires the
1054
- * IAM user to submit an MFA code, specify this value. If MFA authentication is required,
1055
- * the user must provide a code when requesting a set of temporary security credentials. A
1056
- * user who fails to provide the code receives an "access denied" response when requesting
1057
- * resources that require MFA authentication.</p>
1070
+ * IAM user to submit an MFA code, specify this value. If MFA authentication
1071
+ * is required, the user must provide a code when requesting a set of temporary security
1072
+ * credentials. A user who fails to provide the code receives an "access denied" response when
1073
+ * requesting resources that require MFA authentication.</p>
1058
1074
  * <p>The format for this parameter, as described by its regex pattern, is a sequence of six
1059
1075
  * numeric digits.</p>
1060
1076
  */
@@ -7,6 +7,10 @@ export interface AssumedRoleUser {
7
7
  export interface PolicyDescriptorType {
8
8
  arn?: string;
9
9
  }
10
+ export interface ProvidedContext {
11
+ ProviderArn?: string;
12
+ ContextAssertion?: string;
13
+ }
10
14
  export interface Tag {
11
15
  Key: string | undefined;
12
16
  Value: string | undefined;
@@ -23,6 +27,7 @@ export interface AssumeRoleRequest {
23
27
  SerialNumber?: string;
24
28
  TokenCode?: string;
25
29
  SourceIdentity?: string;
30
+ ProvidedContexts?: ProvidedContext[];
26
31
  }
27
32
  export interface Credentials {
28
33
  AccessKeyId: string | undefined;
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.370.0",
4
+ "version": "3.377.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",