AWS SDK for C++  1.8.51
AWS SDK for C++
Public Member Functions | Protected Member Functions | List of all members
Aws::STS::Model::AssumeRoleRequest Class Reference

#include <AssumeRoleRequest.h>

+ Inheritance diagram for Aws::STS::Model::AssumeRoleRequest:

Public Member Functions

 AssumeRoleRequest ()
 
virtual const char * GetServiceRequestName () const override
 
Aws::String SerializePayload () const override
 
const Aws::StringGetRoleArn () const
 
bool RoleArnHasBeenSet () const
 
void SetRoleArn (const Aws::String &value)
 
void SetRoleArn (Aws::String &&value)
 
void SetRoleArn (const char *value)
 
AssumeRoleRequestWithRoleArn (const Aws::String &value)
 
AssumeRoleRequestWithRoleArn (Aws::String &&value)
 
AssumeRoleRequestWithRoleArn (const char *value)
 
const Aws::StringGetRoleSessionName () const
 
bool RoleSessionNameHasBeenSet () const
 
void SetRoleSessionName (const Aws::String &value)
 
void SetRoleSessionName (Aws::String &&value)
 
void SetRoleSessionName (const char *value)
 
AssumeRoleRequestWithRoleSessionName (const Aws::String &value)
 
AssumeRoleRequestWithRoleSessionName (Aws::String &&value)
 
AssumeRoleRequestWithRoleSessionName (const char *value)
 
const Aws::Vector< PolicyDescriptorType > & GetPolicyArns () const
 
bool PolicyArnsHasBeenSet () const
 
void SetPolicyArns (const Aws::Vector< PolicyDescriptorType > &value)
 
void SetPolicyArns (Aws::Vector< PolicyDescriptorType > &&value)
 
AssumeRoleRequestWithPolicyArns (const Aws::Vector< PolicyDescriptorType > &value)
 
AssumeRoleRequestWithPolicyArns (Aws::Vector< PolicyDescriptorType > &&value)
 
AssumeRoleRequestAddPolicyArns (const PolicyDescriptorType &value)
 
AssumeRoleRequestAddPolicyArns (PolicyDescriptorType &&value)
 
const Aws::StringGetPolicy () const
 
bool PolicyHasBeenSet () const
 
void SetPolicy (const Aws::String &value)
 
void SetPolicy (Aws::String &&value)
 
void SetPolicy (const char *value)
 
AssumeRoleRequestWithPolicy (const Aws::String &value)
 
AssumeRoleRequestWithPolicy (Aws::String &&value)
 
AssumeRoleRequestWithPolicy (const char *value)
 
int GetDurationSeconds () const
 
bool DurationSecondsHasBeenSet () const
 
void SetDurationSeconds (int value)
 
AssumeRoleRequestWithDurationSeconds (int value)
 
const Aws::Vector< Tag > & GetTags () const
 
bool TagsHasBeenSet () const
 
void SetTags (const Aws::Vector< Tag > &value)
 
void SetTags (Aws::Vector< Tag > &&value)
 
AssumeRoleRequestWithTags (const Aws::Vector< Tag > &value)
 
AssumeRoleRequestWithTags (Aws::Vector< Tag > &&value)
 
AssumeRoleRequestAddTags (const Tag &value)
 
AssumeRoleRequestAddTags (Tag &&value)
 
const Aws::Vector< Aws::String > & GetTransitiveTagKeys () const
 
bool TransitiveTagKeysHasBeenSet () const
 
void SetTransitiveTagKeys (const Aws::Vector< Aws::String > &value)
 
void SetTransitiveTagKeys (Aws::Vector< Aws::String > &&value)
 
AssumeRoleRequestWithTransitiveTagKeys (const Aws::Vector< Aws::String > &value)
 
AssumeRoleRequestWithTransitiveTagKeys (Aws::Vector< Aws::String > &&value)
 
AssumeRoleRequestAddTransitiveTagKeys (const Aws::String &value)
 
AssumeRoleRequestAddTransitiveTagKeys (Aws::String &&value)
 
AssumeRoleRequestAddTransitiveTagKeys (const char *value)
 
const Aws::StringGetExternalId () const
 
bool ExternalIdHasBeenSet () const
 
void SetExternalId (const Aws::String &value)
 
void SetExternalId (Aws::String &&value)
 
void SetExternalId (const char *value)
 
AssumeRoleRequestWithExternalId (const Aws::String &value)
 
AssumeRoleRequestWithExternalId (Aws::String &&value)
 
AssumeRoleRequestWithExternalId (const char *value)
 
const Aws::StringGetSerialNumber () const
 
bool SerialNumberHasBeenSet () const
 
void SetSerialNumber (const Aws::String &value)
 
void SetSerialNumber (Aws::String &&value)
 
void SetSerialNumber (const char *value)
 
AssumeRoleRequestWithSerialNumber (const Aws::String &value)
 
AssumeRoleRequestWithSerialNumber (Aws::String &&value)
 
AssumeRoleRequestWithSerialNumber (const char *value)
 
const Aws::StringGetTokenCode () const
 
bool TokenCodeHasBeenSet () const
 
void SetTokenCode (const Aws::String &value)
 
void SetTokenCode (Aws::String &&value)
 
void SetTokenCode (const char *value)
 
AssumeRoleRequestWithTokenCode (const Aws::String &value)
 
AssumeRoleRequestWithTokenCode (Aws::String &&value)
 
AssumeRoleRequestWithTokenCode (const char *value)
 
- Public Member Functions inherited from Aws::STS::STSRequest
virtual ~STSRequest ()
 
void AddParametersToRequest (Aws::Http::HttpRequest &httpRequest) const
 
Aws::Http::HeaderValueCollection GetHeaders () const override
 
- Public Member Functions inherited from Aws::AmazonSerializableWebServiceRequest
 AmazonSerializableWebServiceRequest ()
 
virtual ~AmazonSerializableWebServiceRequest ()
 
std::shared_ptr< Aws::IOStreamGetBody () const override
 
- Public Member Functions inherited from Aws::AmazonWebServiceRequest
 AmazonWebServiceRequest ()
 
virtual ~AmazonWebServiceRequest ()=default
 
virtual void AddQueryStringParameters (Aws::Http::URI &uri) const
 
virtual void PutToPresignedUrl (Aws::Http::URI &uri) const
 
virtual bool IsStreaming () const
 
virtual bool IsEventStreamRequest () const
 
virtual bool SignBody () const
 
virtual bool IsChunked () const
 
virtual void SetRequestSignedHandler (const RequestSignedHandler &handler)
 
virtual const RequestSignedHandlerGetRequestSignedHandler () const
 
const Aws::IOStreamFactoryGetResponseStreamFactory () const
 
void SetResponseStreamFactory (const Aws::IOStreamFactory &factory)
 
virtual void SetDataReceivedEventHandler (const Aws::Http::DataReceivedEventHandler &dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (const Aws::Http::DataSentEventHandler &dataSentEventHandler)
 
virtual void SetContinueRequestHandler (const Aws::Http::ContinueRequestHandler &continueRequestHandler)
 
virtual void SetDataReceivedEventHandler (Aws::Http::DataReceivedEventHandler &&dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (Aws::Http::DataSentEventHandler &&dataSentEventHandler)
 
virtual void SetContinueRequestHandler (Aws::Http::ContinueRequestHandler &&continueRequestHandler)
 
virtual void SetRequestRetryHandler (const RequestRetryHandler &handler)
 
virtual void SetRequestRetryHandler (RequestRetryHandler &&handler)
 
virtual const Aws::Http::DataReceivedEventHandlerGetDataReceivedEventHandler () const
 
virtual const Aws::Http::DataSentEventHandlerGetDataSentEventHandler () const
 
virtual const Aws::Http::ContinueRequestHandlerGetContinueRequestHandler () const
 
virtual const RequestRetryHandlerGetRequestRetryHandler () const
 
virtual bool ShouldComputeContentMd5 () const
 

Protected Member Functions

void DumpBodyToUrl (Aws::Http::URI &uri) const override
 
- Protected Member Functions inherited from Aws::STS::STSRequest
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders () const
 

Detailed Description

Definition at line 24 of file AssumeRoleRequest.h.

Constructor & Destructor Documentation

◆ AssumeRoleRequest()

Aws::STS::Model::AssumeRoleRequest::AssumeRoleRequest ( )

Member Function Documentation

◆ AddPolicyArns() [1/2]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::AddPolicyArns ( const PolicyDescriptorType value)
inline

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies. The policies must exist in the same account as the role.

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the plain text that you use for both inline and managed session policies can't exceed 2,048 characters. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

Definition at line 384 of file AssumeRoleRequest.h.

◆ AddPolicyArns() [2/2]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::AddPolicyArns ( PolicyDescriptorType &&  value)
inline

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies. The policies must exist in the same account as the role.

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the plain text that you use for both inline and managed session policies can't exceed 2,048 characters. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

Definition at line 410 of file AssumeRoleRequest.h.

◆ AddTags() [1/2]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::AddTags ( const Tag value)
inline

A list of session tags that you want to pass. Each session tag consists of a key name and an associated value. For more information about session tags, see Tagging AWS STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these and additional limits, see IAM and STS Character Limits in the IAM User Guide.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

You can pass a session tag with the same key as a tag that is already attached to the role. When you do, session tags override a role tag with the same key.

Tag key–value pairs are not case sensitive, but case is preserved. This means that you cannot have separate Department and department tag keys. Assume that the role has the Department=Marketing tag and you pass the department=engineering session tag. Department and department are not saved as separate tags, and the session tag passed in the request takes precedence over the role tag.

Additionally, if you used temporary credentials to perform this operation, the new session inherits any transitive session tags from the calling session. If you pass a session tag with the same key as an inherited tag, the operation fails. To view the inherited tags for a session, see the AWS CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 938 of file AssumeRoleRequest.h.

◆ AddTags() [2/2]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::AddTags ( Tag &&  value)
inline

A list of session tags that you want to pass. Each session tag consists of a key name and an associated value. For more information about session tags, see Tagging AWS STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these and additional limits, see IAM and STS Character Limits in the IAM User Guide.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

You can pass a session tag with the same key as a tag that is already attached to the role. When you do, session tags override a role tag with the same key.

Tag key–value pairs are not case sensitive, but case is preserved. This means that you cannot have separate Department and department tag keys. Assume that the role has the Department=Marketing tag and you pass the department=engineering session tag. Department and department are not saved as separate tags, and the session tag passed in the request takes precedence over the role tag.

Additionally, if you used temporary credentials to perform this operation, the new session inherits any transitive session tags from the calling session. If you pass a session tag with the same key as an inherited tag, the operation fails. To view the inherited tags for a session, see the AWS CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 973 of file AssumeRoleRequest.h.

◆ AddTransitiveTagKeys() [1/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::AddTransitiveTagKeys ( const Aws::String value)
inline

A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain. For more information, see Chaining Roles with Session Tags in the IAM User Guide.

This parameter is optional. When you set session tags as transitive, the session policy and session tags packed binary limit is not affected.

If you choose not to specify a transitive tag key, then no tags are passed from this session to any subsequent sessions.

Definition at line 1065 of file AssumeRoleRequest.h.

◆ AddTransitiveTagKeys() [2/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::AddTransitiveTagKeys ( Aws::String &&  value)
inline

A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain. For more information, see Chaining Roles with Session Tags in the IAM User Guide.

This parameter is optional. When you set session tags as transitive, the session policy and session tags packed binary limit is not affected.

If you choose not to specify a transitive tag key, then no tags are passed from this session to any subsequent sessions.

Definition at line 1078 of file AssumeRoleRequest.h.

◆ AddTransitiveTagKeys() [3/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::AddTransitiveTagKeys ( const char *  value)
inline

A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain. For more information, see Chaining Roles with Session Tags in the IAM User Guide.

This parameter is optional. When you set session tags as transitive, the session policy and session tags packed binary limit is not affected.

If you choose not to specify a transitive tag key, then no tags are passed from this session to any subsequent sessions.

Definition at line 1091 of file AssumeRoleRequest.h.

◆ DumpBodyToUrl()

void Aws::STS::Model::AssumeRoleRequest::DumpBodyToUrl ( Aws::Http::URI uri) const
overrideprotectedvirtual

Default does nothing. Override this to convert what would otherwise be the payload of the request to a query string format.

Reimplemented from Aws::AmazonWebServiceRequest.

◆ DurationSecondsHasBeenSet()

bool Aws::STS::Model::AssumeRoleRequest::DurationSecondsHasBeenSet ( ) const
inline

The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. This setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting, the operation fails. For example, if you specify a session duration of 12 hours, but your administrator set the maximum session duration to 6 hours, your operation fails. To learn how to view the maximum value for your role, see View the Maximum Session Duration Setting for a Role in the IAM User Guide.

By default, the value is set to 3600 seconds.

The DurationSeconds parameter is separate from the duration of a console session that you might request using the returned credentials. The request to the federation endpoint for a console sign-in token takes a SessionDuration parameter that specifies the maximum length of the console session. For more information, see Creating a URL that Enables Federated Users to Access the AWS Management Console in the IAM User Guide.

Definition at line 648 of file AssumeRoleRequest.h.

◆ ExternalIdHasBeenSet()

bool Aws::STS::Model::AssumeRoleRequest::ExternalIdHasBeenSet ( ) const
inline

A unique identifier that might be required when you assume a role in another account. If the administrator of the account to which the role belongs provided you with an external ID, then provide that value in the ExternalId parameter. This value can be any string, such as a passphrase or account number. A cross-account role is usually set up to trust everyone in an account. Therefore, the administrator of the trusting account might send an external ID to the administrator of the trusted account. That way, only someone with the ID can assume the role, rather than everyone in the account. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the IAM User Guide.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-

Definition at line 1130 of file AssumeRoleRequest.h.

◆ GetDurationSeconds()

int Aws::STS::Model::AssumeRoleRequest::GetDurationSeconds ( ) const
inline

The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. This setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting, the operation fails. For example, if you specify a session duration of 12 hours, but your administrator set the maximum session duration to 6 hours, your operation fails. To learn how to view the maximum value for your role, see View the Maximum Session Duration Setting for a Role in the IAM User Guide.

By default, the value is set to 3600 seconds.

The DurationSeconds parameter is separate from the duration of a console session that you might request using the returned credentials. The request to the federation endpoint for a console sign-in token takes a SessionDuration parameter that specifies the maximum length of the console session. For more information, see Creating a URL that Enables Federated Users to Access the AWS Management Console in the IAM User Guide.

Definition at line 626 of file AssumeRoleRequest.h.

◆ GetExternalId()

const Aws::String& Aws::STS::Model::AssumeRoleRequest::GetExternalId ( ) const
inline

A unique identifier that might be required when you assume a role in another account. If the administrator of the account to which the role belongs provided you with an external ID, then provide that value in the ExternalId parameter. This value can be any string, such as a passphrase or account number. A cross-account role is usually set up to trust everyone in an account. Therefore, the administrator of the trusting account might send an external ID to the administrator of the trusted account. That way, only someone with the ID can assume the role, rather than everyone in the account. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the IAM User Guide.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-

Definition at line 1111 of file AssumeRoleRequest.h.

◆ GetPolicy()

const Aws::String& Aws::STS::Model::AssumeRoleRequest::GetPolicy ( ) const
inline

An IAM policy in JSON format that you want to use as an inline session policy.

This parameter is optional. Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

The plain text that you use for both inline and managed session policies can't exceed 2,048 characters. The JSON policy characters can be any ASCII character from the space character to the end of the valid character list ( through ). It can also include the tab (), linefeed (), and carriage return () characters.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Definition at line 435 of file AssumeRoleRequest.h.

◆ GetPolicyArns()

const Aws::Vector<PolicyDescriptorType>& Aws::STS::Model::AssumeRoleRequest::GetPolicyArns ( ) const
inline

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies. The policies must exist in the same account as the role.

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the plain text that you use for both inline and managed session policies can't exceed 2,048 characters. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

Definition at line 228 of file AssumeRoleRequest.h.

◆ GetRoleArn()

const Aws::String& Aws::STS::Model::AssumeRoleRequest::GetRoleArn ( ) const
inline

The Amazon Resource Name (ARN) of the role to assume.

Definition at line 45 of file AssumeRoleRequest.h.

◆ GetRoleSessionName()

const Aws::String& Aws::STS::Model::AssumeRoleRequest::GetRoleSessionName ( ) const
inline

An identifier for the assumed role session.

Use the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal. This means that subsequent cross-account API requests that use the temporary security credentials will expose the role session name to the external account in their AWS CloudTrail logs.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 96 of file AssumeRoleRequest.h.

◆ GetSerialNumber()

const Aws::String& Aws::STS::Model::AssumeRoleRequest::GetSerialNumber ( ) const
inline

The identification number of the MFA device that is associated with the user who is making the AssumeRole call. Specify this value if the trust policy of the role being assumed includes a condition that requires MFA authentication. The value is either the serial number for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 1258 of file AssumeRoleRequest.h.

◆ GetServiceRequestName()

virtual const char* Aws::STS::Model::AssumeRoleRequest::GetServiceRequestName ( ) const
inlineoverridevirtual

Implements Aws::AmazonWebServiceRequest.

Definition at line 33 of file AssumeRoleRequest.h.

◆ GetTags()

const Aws::Vector<Tag>& Aws::STS::Model::AssumeRoleRequest::GetTags ( ) const
inline

A list of session tags that you want to pass. Each session tag consists of a key name and an associated value. For more information about session tags, see Tagging AWS STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these and additional limits, see IAM and STS Character Limits in the IAM User Guide.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

You can pass a session tag with the same key as a tag that is already attached to the role. When you do, session tags override a role tag with the same key.

Tag key–value pairs are not case sensitive, but case is preserved. This means that you cannot have separate Department and department tag keys. Assume that the role has the Department=Marketing tag and you pass the department=engineering session tag. Department and department are not saved as separate tags, and the session tag passed in the request takes precedence over the role tag.

Additionally, if you used temporary credentials to perform this operation, the new session inherits any transitive session tags from the calling session. If you pass a session tag with the same key as an inherited tag, the operation fails. To view the inherited tags for a session, see the AWS CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 728 of file AssumeRoleRequest.h.

◆ GetTokenCode()

const Aws::String& Aws::STS::Model::AssumeRoleRequest::GetTokenCode ( ) const
inline

The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is, if the policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the TokenCode value is missing or expired, the AssumeRole call returns an "access denied" error.

The format for this parameter, as described by its regex pattern, is a sequence of six numeric digits.

Definition at line 1360 of file AssumeRoleRequest.h.

◆ GetTransitiveTagKeys()

const Aws::Vector<Aws::String>& Aws::STS::Model::AssumeRoleRequest::GetTransitiveTagKeys ( ) const
inline

A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain. For more information, see Chaining Roles with Session Tags in the IAM User Guide.

This parameter is optional. When you set session tags as transitive, the session policy and session tags packed binary limit is not affected.

If you choose not to specify a transitive tag key, then no tags are passed from this session to any subsequent sessions.

Definition at line 987 of file AssumeRoleRequest.h.

◆ PolicyArnsHasBeenSet()

bool Aws::STS::Model::AssumeRoleRequest::PolicyArnsHasBeenSet ( ) const
inline

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies. The policies must exist in the same account as the role.

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the plain text that you use for both inline and managed session policies can't exceed 2,048 characters. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

Definition at line 254 of file AssumeRoleRequest.h.

◆ PolicyHasBeenSet()

bool Aws::STS::Model::AssumeRoleRequest::PolicyHasBeenSet ( ) const
inline

An IAM policy in JSON format that you want to use as an inline session policy.

This parameter is optional. Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

The plain text that you use for both inline and managed session policies can't exceed 2,048 characters. The JSON policy characters can be any ASCII character from the space character to the end of the valid character list ( through ). It can also include the tab (), linefeed (), and carriage return () characters.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Definition at line 459 of file AssumeRoleRequest.h.

◆ RoleArnHasBeenSet()

bool Aws::STS::Model::AssumeRoleRequest::RoleArnHasBeenSet ( ) const
inline

The Amazon Resource Name (ARN) of the role to assume.

Definition at line 50 of file AssumeRoleRequest.h.

◆ RoleSessionNameHasBeenSet()

bool Aws::STS::Model::AssumeRoleRequest::RoleSessionNameHasBeenSet ( ) const
inline

An identifier for the assumed role session.

Use the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal. This means that subsequent cross-account API requests that use the temporary security credentials will expose the role session name to the external account in their AWS CloudTrail logs.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 111 of file AssumeRoleRequest.h.

◆ SerializePayload()

Aws::String Aws::STS::Model::AssumeRoleRequest::SerializePayload ( ) const
overridevirtual

Convert payload into String.

Implements Aws::AmazonSerializableWebServiceRequest.

◆ SerialNumberHasBeenSet()

bool Aws::STS::Model::AssumeRoleRequest::SerialNumberHasBeenSet ( ) const
inline

The identification number of the MFA device that is associated with the user who is making the AssumeRole call. Specify this value if the trust policy of the role being assumed includes a condition that requires MFA authentication. The value is either the serial number for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 1271 of file AssumeRoleRequest.h.

◆ SetDurationSeconds()

void Aws::STS::Model::AssumeRoleRequest::SetDurationSeconds ( int  value)
inline

The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. This setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting, the operation fails. For example, if you specify a session duration of 12 hours, but your administrator set the maximum session duration to 6 hours, your operation fails. To learn how to view the maximum value for your role, see View the Maximum Session Duration Setting for a Role in the IAM User Guide.

By default, the value is set to 3600 seconds.

The DurationSeconds parameter is separate from the duration of a console session that you might request using the returned credentials. The request to the federation endpoint for a console sign-in token takes a SessionDuration parameter that specifies the maximum length of the console session. For more information, see Creating a URL that Enables Federated Users to Access the AWS Management Console in the IAM User Guide.

Definition at line 670 of file AssumeRoleRequest.h.

◆ SetExternalId() [1/3]

void Aws::STS::Model::AssumeRoleRequest::SetExternalId ( const Aws::String value)
inline

A unique identifier that might be required when you assume a role in another account. If the administrator of the account to which the role belongs provided you with an external ID, then provide that value in the ExternalId parameter. This value can be any string, such as a passphrase or account number. A cross-account role is usually set up to trust everyone in an account. Therefore, the administrator of the trusting account might send an external ID to the administrator of the trusted account. That way, only someone with the ID can assume the role, rather than everyone in the account. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the IAM User Guide.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-

Definition at line 1149 of file AssumeRoleRequest.h.

◆ SetExternalId() [2/3]

void Aws::STS::Model::AssumeRoleRequest::SetExternalId ( Aws::String &&  value)
inline

A unique identifier that might be required when you assume a role in another account. If the administrator of the account to which the role belongs provided you with an external ID, then provide that value in the ExternalId parameter. This value can be any string, such as a passphrase or account number. A cross-account role is usually set up to trust everyone in an account. Therefore, the administrator of the trusting account might send an external ID to the administrator of the trusted account. That way, only someone with the ID can assume the role, rather than everyone in the account. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the IAM User Guide.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-

Definition at line 1168 of file AssumeRoleRequest.h.

◆ SetExternalId() [3/3]

void Aws::STS::Model::AssumeRoleRequest::SetExternalId ( const char *  value)
inline

A unique identifier that might be required when you assume a role in another account. If the administrator of the account to which the role belongs provided you with an external ID, then provide that value in the ExternalId parameter. This value can be any string, such as a passphrase or account number. A cross-account role is usually set up to trust everyone in an account. Therefore, the administrator of the trusting account might send an external ID to the administrator of the trusted account. That way, only someone with the ID can assume the role, rather than everyone in the account. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the IAM User Guide.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-

Definition at line 1187 of file AssumeRoleRequest.h.

◆ SetPolicy() [1/3]

void Aws::STS::Model::AssumeRoleRequest::SetPolicy ( const Aws::String value)
inline

An IAM policy in JSON format that you want to use as an inline session policy.

This parameter is optional. Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

The plain text that you use for both inline and managed session policies can't exceed 2,048 characters. The JSON policy characters can be any ASCII character from the space character to the end of the valid character list ( through ). It can also include the tab (), linefeed (), and carriage return () characters.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Definition at line 483 of file AssumeRoleRequest.h.

◆ SetPolicy() [2/3]

void Aws::STS::Model::AssumeRoleRequest::SetPolicy ( Aws::String &&  value)
inline

An IAM policy in JSON format that you want to use as an inline session policy.

This parameter is optional. Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

The plain text that you use for both inline and managed session policies can't exceed 2,048 characters. The JSON policy characters can be any ASCII character from the space character to the end of the valid character list ( through ). It can also include the tab (), linefeed (), and carriage return () characters.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Definition at line 507 of file AssumeRoleRequest.h.

◆ SetPolicy() [3/3]

void Aws::STS::Model::AssumeRoleRequest::SetPolicy ( const char *  value)
inline

An IAM policy in JSON format that you want to use as an inline session policy.

This parameter is optional. Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

The plain text that you use for both inline and managed session policies can't exceed 2,048 characters. The JSON policy characters can be any ASCII character from the space character to the end of the valid character list ( through ). It can also include the tab (), linefeed (), and carriage return () characters.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Definition at line 531 of file AssumeRoleRequest.h.

◆ SetPolicyArns() [1/2]

void Aws::STS::Model::AssumeRoleRequest::SetPolicyArns ( const Aws::Vector< PolicyDescriptorType > &  value)
inline

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies. The policies must exist in the same account as the role.

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the plain text that you use for both inline and managed session policies can't exceed 2,048 characters. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

Definition at line 280 of file AssumeRoleRequest.h.

◆ SetPolicyArns() [2/2]

void Aws::STS::Model::AssumeRoleRequest::SetPolicyArns ( Aws::Vector< PolicyDescriptorType > &&  value)
inline

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies. The policies must exist in the same account as the role.

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the plain text that you use for both inline and managed session policies can't exceed 2,048 characters. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

Definition at line 306 of file AssumeRoleRequest.h.

◆ SetRoleArn() [1/3]

void Aws::STS::Model::AssumeRoleRequest::SetRoleArn ( const Aws::String value)
inline

The Amazon Resource Name (ARN) of the role to assume.

Definition at line 55 of file AssumeRoleRequest.h.

◆ SetRoleArn() [2/3]

void Aws::STS::Model::AssumeRoleRequest::SetRoleArn ( Aws::String &&  value)
inline

The Amazon Resource Name (ARN) of the role to assume.

Definition at line 60 of file AssumeRoleRequest.h.

◆ SetRoleArn() [3/3]

void Aws::STS::Model::AssumeRoleRequest::SetRoleArn ( const char *  value)
inline

The Amazon Resource Name (ARN) of the role to assume.

Definition at line 65 of file AssumeRoleRequest.h.

◆ SetRoleSessionName() [1/3]

void Aws::STS::Model::AssumeRoleRequest::SetRoleSessionName ( const Aws::String value)
inline

An identifier for the assumed role session.

Use the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal. This means that subsequent cross-account API requests that use the temporary security credentials will expose the role session name to the external account in their AWS CloudTrail logs.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 126 of file AssumeRoleRequest.h.

◆ SetRoleSessionName() [2/3]

void Aws::STS::Model::AssumeRoleRequest::SetRoleSessionName ( Aws::String &&  value)
inline

An identifier for the assumed role session.

Use the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal. This means that subsequent cross-account API requests that use the temporary security credentials will expose the role session name to the external account in their AWS CloudTrail logs.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 141 of file AssumeRoleRequest.h.

◆ SetRoleSessionName() [3/3]

void Aws::STS::Model::AssumeRoleRequest::SetRoleSessionName ( const char *  value)
inline

An identifier for the assumed role session.

Use the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal. This means that subsequent cross-account API requests that use the temporary security credentials will expose the role session name to the external account in their AWS CloudTrail logs.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 156 of file AssumeRoleRequest.h.

◆ SetSerialNumber() [1/3]

void Aws::STS::Model::AssumeRoleRequest::SetSerialNumber ( const Aws::String value)
inline

The identification number of the MFA device that is associated with the user who is making the AssumeRole call. Specify this value if the trust policy of the role being assumed includes a condition that requires MFA authentication. The value is either the serial number for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 1284 of file AssumeRoleRequest.h.

◆ SetSerialNumber() [2/3]

void Aws::STS::Model::AssumeRoleRequest::SetSerialNumber ( Aws::String &&  value)
inline

The identification number of the MFA device that is associated with the user who is making the AssumeRole call. Specify this value if the trust policy of the role being assumed includes a condition that requires MFA authentication. The value is either the serial number for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 1297 of file AssumeRoleRequest.h.

◆ SetSerialNumber() [3/3]

void Aws::STS::Model::AssumeRoleRequest::SetSerialNumber ( const char *  value)
inline

The identification number of the MFA device that is associated with the user who is making the AssumeRole call. Specify this value if the trust policy of the role being assumed includes a condition that requires MFA authentication. The value is either the serial number for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 1310 of file AssumeRoleRequest.h.

◆ SetTags() [1/2]

void Aws::STS::Model::AssumeRoleRequest::SetTags ( const Aws::Vector< Tag > &  value)
inline

A list of session tags that you want to pass. Each session tag consists of a key name and an associated value. For more information about session tags, see Tagging AWS STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these and additional limits, see IAM and STS Character Limits in the IAM User Guide.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

You can pass a session tag with the same key as a tag that is already attached to the role. When you do, session tags override a role tag with the same key.

Tag key–value pairs are not case sensitive, but case is preserved. This means that you cannot have separate Department and department tag keys. Assume that the role has the Department=Marketing tag and you pass the department=engineering session tag. Department and department are not saved as separate tags, and the session tag passed in the request takes precedence over the role tag.

Additionally, if you used temporary credentials to perform this operation, the new session inherits any transitive session tags from the calling session. If you pass a session tag with the same key as an inherited tag, the operation fails. To view the inherited tags for a session, see the AWS CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 798 of file AssumeRoleRequest.h.

◆ SetTags() [2/2]

void Aws::STS::Model::AssumeRoleRequest::SetTags ( Aws::Vector< Tag > &&  value)
inline

A list of session tags that you want to pass. Each session tag consists of a key name and an associated value. For more information about session tags, see Tagging AWS STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these and additional limits, see IAM and STS Character Limits in the IAM User Guide.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

You can pass a session tag with the same key as a tag that is already attached to the role. When you do, session tags override a role tag with the same key.

Tag key–value pairs are not case sensitive, but case is preserved. This means that you cannot have separate Department and department tag keys. Assume that the role has the Department=Marketing tag and you pass the department=engineering session tag. Department and department are not saved as separate tags, and the session tag passed in the request takes precedence over the role tag.

Additionally, if you used temporary credentials to perform this operation, the new session inherits any transitive session tags from the calling session. If you pass a session tag with the same key as an inherited tag, the operation fails. To view the inherited tags for a session, see the AWS CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 833 of file AssumeRoleRequest.h.

◆ SetTokenCode() [1/3]

void Aws::STS::Model::AssumeRoleRequest::SetTokenCode ( const Aws::String value)
inline

The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is, if the policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the TokenCode value is missing or expired, the AssumeRole call returns an "access denied" error.

The format for this parameter, as described by its regex pattern, is a sequence of six numeric digits.

Definition at line 1380 of file AssumeRoleRequest.h.

◆ SetTokenCode() [2/3]

void Aws::STS::Model::AssumeRoleRequest::SetTokenCode ( Aws::String &&  value)
inline

The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is, if the policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the TokenCode value is missing or expired, the AssumeRole call returns an "access denied" error.

The format for this parameter, as described by its regex pattern, is a sequence of six numeric digits.

Definition at line 1390 of file AssumeRoleRequest.h.

◆ SetTokenCode() [3/3]

void Aws::STS::Model::AssumeRoleRequest::SetTokenCode ( const char *  value)
inline

The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is, if the policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the TokenCode value is missing or expired, the AssumeRole call returns an "access denied" error.

The format for this parameter, as described by its regex pattern, is a sequence of six numeric digits.

Definition at line 1400 of file AssumeRoleRequest.h.

◆ SetTransitiveTagKeys() [1/2]

void Aws::STS::Model::AssumeRoleRequest::SetTransitiveTagKeys ( const Aws::Vector< Aws::String > &  value)
inline

A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain. For more information, see Chaining Roles with Session Tags in the IAM User Guide.

This parameter is optional. When you set session tags as transitive, the session policy and session tags packed binary limit is not affected.

If you choose not to specify a transitive tag key, then no tags are passed from this session to any subsequent sessions.

Definition at line 1013 of file AssumeRoleRequest.h.

◆ SetTransitiveTagKeys() [2/2]

void Aws::STS::Model::AssumeRoleRequest::SetTransitiveTagKeys ( Aws::Vector< Aws::String > &&  value)
inline

A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain. For more information, see Chaining Roles with Session Tags in the IAM User Guide.

This parameter is optional. When you set session tags as transitive, the session policy and session tags packed binary limit is not affected.

If you choose not to specify a transitive tag key, then no tags are passed from this session to any subsequent sessions.

Definition at line 1026 of file AssumeRoleRequest.h.

◆ TagsHasBeenSet()

bool Aws::STS::Model::AssumeRoleRequest::TagsHasBeenSet ( ) const
inline

A list of session tags that you want to pass. Each session tag consists of a key name and an associated value. For more information about session tags, see Tagging AWS STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these and additional limits, see IAM and STS Character Limits in the IAM User Guide.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

You can pass a session tag with the same key as a tag that is already attached to the role. When you do, session tags override a role tag with the same key.

Tag key–value pairs are not case sensitive, but case is preserved. This means that you cannot have separate Department and department tag keys. Assume that the role has the Department=Marketing tag and you pass the department=engineering session tag. Department and department are not saved as separate tags, and the session tag passed in the request takes precedence over the role tag.

Additionally, if you used temporary credentials to perform this operation, the new session inherits any transitive session tags from the calling session. If you pass a session tag with the same key as an inherited tag, the operation fails. To view the inherited tags for a session, see the AWS CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 763 of file AssumeRoleRequest.h.

◆ TokenCodeHasBeenSet()

bool Aws::STS::Model::AssumeRoleRequest::TokenCodeHasBeenSet ( ) const
inline

The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is, if the policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the TokenCode value is missing or expired, the AssumeRole call returns an "access denied" error.

The format for this parameter, as described by its regex pattern, is a sequence of six numeric digits.

Definition at line 1370 of file AssumeRoleRequest.h.

◆ TransitiveTagKeysHasBeenSet()

bool Aws::STS::Model::AssumeRoleRequest::TransitiveTagKeysHasBeenSet ( ) const
inline

A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain. For more information, see Chaining Roles with Session Tags in the IAM User Guide.

This parameter is optional. When you set session tags as transitive, the session policy and session tags packed binary limit is not affected.

If you choose not to specify a transitive tag key, then no tags are passed from this session to any subsequent sessions.

Definition at line 1000 of file AssumeRoleRequest.h.

◆ WithDurationSeconds()

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithDurationSeconds ( int  value)
inline

The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. This setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting, the operation fails. For example, if you specify a session duration of 12 hours, but your administrator set the maximum session duration to 6 hours, your operation fails. To learn how to view the maximum value for your role, see View the Maximum Session Duration Setting for a Role in the IAM User Guide.

By default, the value is set to 3600 seconds.

The DurationSeconds parameter is separate from the duration of a console session that you might request using the returned credentials. The request to the federation endpoint for a console sign-in token takes a SessionDuration parameter that specifies the maximum length of the console session. For more information, see Creating a URL that Enables Federated Users to Access the AWS Management Console in the IAM User Guide.

Definition at line 692 of file AssumeRoleRequest.h.

◆ WithExternalId() [1/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithExternalId ( const Aws::String value)
inline

A unique identifier that might be required when you assume a role in another account. If the administrator of the account to which the role belongs provided you with an external ID, then provide that value in the ExternalId parameter. This value can be any string, such as a passphrase or account number. A cross-account role is usually set up to trust everyone in an account. Therefore, the administrator of the trusting account might send an external ID to the administrator of the trusted account. That way, only someone with the ID can assume the role, rather than everyone in the account. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the IAM User Guide.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-

Definition at line 1206 of file AssumeRoleRequest.h.

◆ WithExternalId() [2/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithExternalId ( Aws::String &&  value)
inline

A unique identifier that might be required when you assume a role in another account. If the administrator of the account to which the role belongs provided you with an external ID, then provide that value in the ExternalId parameter. This value can be any string, such as a passphrase or account number. A cross-account role is usually set up to trust everyone in an account. Therefore, the administrator of the trusting account might send an external ID to the administrator of the trusted account. That way, only someone with the ID can assume the role, rather than everyone in the account. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the IAM User Guide.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-

Definition at line 1225 of file AssumeRoleRequest.h.

◆ WithExternalId() [3/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithExternalId ( const char *  value)
inline

A unique identifier that might be required when you assume a role in another account. If the administrator of the account to which the role belongs provided you with an external ID, then provide that value in the ExternalId parameter. This value can be any string, such as a passphrase or account number. A cross-account role is usually set up to trust everyone in an account. Therefore, the administrator of the trusting account might send an external ID to the administrator of the trusted account. That way, only someone with the ID can assume the role, rather than everyone in the account. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the IAM User Guide.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-

Definition at line 1244 of file AssumeRoleRequest.h.

◆ WithPolicy() [1/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithPolicy ( const Aws::String value)
inline

An IAM policy in JSON format that you want to use as an inline session policy.

This parameter is optional. Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

The plain text that you use for both inline and managed session policies can't exceed 2,048 characters. The JSON policy characters can be any ASCII character from the space character to the end of the valid character list ( through ). It can also include the tab (), linefeed (), and carriage return () characters.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Definition at line 555 of file AssumeRoleRequest.h.

◆ WithPolicy() [2/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithPolicy ( Aws::String &&  value)
inline

An IAM policy in JSON format that you want to use as an inline session policy.

This parameter is optional. Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

The plain text that you use for both inline and managed session policies can't exceed 2,048 characters. The JSON policy characters can be any ASCII character from the space character to the end of the valid character list ( through ). It can also include the tab (), linefeed (), and carriage return () characters.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Definition at line 579 of file AssumeRoleRequest.h.

◆ WithPolicy() [3/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithPolicy ( const char *  value)
inline

An IAM policy in JSON format that you want to use as an inline session policy.

This parameter is optional. Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

The plain text that you use for both inline and managed session policies can't exceed 2,048 characters. The JSON policy characters can be any ASCII character from the space character to the end of the valid character list ( through ). It can also include the tab (), linefeed (), and carriage return () characters.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Definition at line 603 of file AssumeRoleRequest.h.

◆ WithPolicyArns() [1/2]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithPolicyArns ( const Aws::Vector< PolicyDescriptorType > &  value)
inline

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies. The policies must exist in the same account as the role.

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the plain text that you use for both inline and managed session policies can't exceed 2,048 characters. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

Definition at line 332 of file AssumeRoleRequest.h.

◆ WithPolicyArns() [2/2]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithPolicyArns ( Aws::Vector< PolicyDescriptorType > &&  value)
inline

The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies. The policies must exist in the same account as the role.

This parameter is optional. You can provide up to 10 managed policy ARNs. However, the plain text that you use for both inline and managed session policies can't exceed 2,048 characters. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

Passing policies to this operation returns new temporary credentials. The resulting session's permissions are the intersection of the role's identity-based policy and the session policies. You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You cannot use session policies to grant more permissions than those allowed by the identity-based policy of the role that is being assumed. For more information, see Session Policies in the IAM User Guide.

Definition at line 358 of file AssumeRoleRequest.h.

◆ WithRoleArn() [1/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithRoleArn ( const Aws::String value)
inline

The Amazon Resource Name (ARN) of the role to assume.

Definition at line 70 of file AssumeRoleRequest.h.

◆ WithRoleArn() [2/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithRoleArn ( Aws::String &&  value)
inline

The Amazon Resource Name (ARN) of the role to assume.

Definition at line 75 of file AssumeRoleRequest.h.

◆ WithRoleArn() [3/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithRoleArn ( const char *  value)
inline

The Amazon Resource Name (ARN) of the role to assume.

Definition at line 80 of file AssumeRoleRequest.h.

◆ WithRoleSessionName() [1/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithRoleSessionName ( const Aws::String value)
inline

An identifier for the assumed role session.

Use the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal. This means that subsequent cross-account API requests that use the temporary security credentials will expose the role session name to the external account in their AWS CloudTrail logs.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 171 of file AssumeRoleRequest.h.

◆ WithRoleSessionName() [2/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithRoleSessionName ( Aws::String &&  value)
inline

An identifier for the assumed role session.

Use the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal. This means that subsequent cross-account API requests that use the temporary security credentials will expose the role session name to the external account in their AWS CloudTrail logs.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 186 of file AssumeRoleRequest.h.

◆ WithRoleSessionName() [3/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithRoleSessionName ( const char *  value)
inline

An identifier for the assumed role session.

Use the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal. This means that subsequent cross-account API requests that use the temporary security credentials will expose the role session name to the external account in their AWS CloudTrail logs.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 201 of file AssumeRoleRequest.h.

◆ WithSerialNumber() [1/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithSerialNumber ( const Aws::String value)
inline

The identification number of the MFA device that is associated with the user who is making the AssumeRole call. Specify this value if the trust policy of the role being assumed includes a condition that requires MFA authentication. The value is either the serial number for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 1323 of file AssumeRoleRequest.h.

◆ WithSerialNumber() [2/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithSerialNumber ( Aws::String &&  value)
inline

The identification number of the MFA device that is associated with the user who is making the AssumeRole call. Specify this value if the trust policy of the role being assumed includes a condition that requires MFA authentication. The value is either the serial number for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 1336 of file AssumeRoleRequest.h.

◆ WithSerialNumber() [3/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithSerialNumber ( const char *  value)
inline

The identification number of the MFA device that is associated with the user who is making the AssumeRole call. Specify this value if the trust policy of the role being assumed includes a condition that requires MFA authentication. The value is either the serial number for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.-

Definition at line 1349 of file AssumeRoleRequest.h.

◆ WithTags() [1/2]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithTags ( const Aws::Vector< Tag > &  value)
inline

A list of session tags that you want to pass. Each session tag consists of a key name and an associated value. For more information about session tags, see Tagging AWS STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these and additional limits, see IAM and STS Character Limits in the IAM User Guide.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

You can pass a session tag with the same key as a tag that is already attached to the role. When you do, session tags override a role tag with the same key.

Tag key–value pairs are not case sensitive, but case is preserved. This means that you cannot have separate Department and department tag keys. Assume that the role has the Department=Marketing tag and you pass the department=engineering session tag. Department and department are not saved as separate tags, and the session tag passed in the request takes precedence over the role tag.

Additionally, if you used temporary credentials to perform this operation, the new session inherits any transitive session tags from the calling session. If you pass a session tag with the same key as an inherited tag, the operation fails. To view the inherited tags for a session, see the AWS CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 868 of file AssumeRoleRequest.h.

◆ WithTags() [2/2]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithTags ( Aws::Vector< Tag > &&  value)
inline

A list of session tags that you want to pass. Each session tag consists of a key name and an associated value. For more information about session tags, see Tagging AWS STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plain text session tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these and additional limits, see IAM and STS Character Limits in the IAM User Guide.

An AWS conversion compresses the passed session policies and session tags into a packed binary format that has a separate limit. Your request can fail for this limit even if your plain text meets the other requirements. The PackedPolicySize response element indicates by percentage how close the policies and tags for your request are to the upper size limit.

You can pass a session tag with the same key as a tag that is already attached to the role. When you do, session tags override a role tag with the same key.

Tag key–value pairs are not case sensitive, but case is preserved. This means that you cannot have separate Department and department tag keys. Assume that the role has the Department=Marketing tag and you pass the department=engineering session tag. Department and department are not saved as separate tags, and the session tag passed in the request takes precedence over the role tag.

Additionally, if you used temporary credentials to perform this operation, the new session inherits any transitive session tags from the calling session. If you pass a session tag with the same key as an inherited tag, the operation fails. To view the inherited tags for a session, see the AWS CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 903 of file AssumeRoleRequest.h.

◆ WithTokenCode() [1/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithTokenCode ( const Aws::String value)
inline

The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is, if the policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the TokenCode value is missing or expired, the AssumeRole call returns an "access denied" error.

The format for this parameter, as described by its regex pattern, is a sequence of six numeric digits.

Definition at line 1410 of file AssumeRoleRequest.h.

◆ WithTokenCode() [2/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithTokenCode ( Aws::String &&  value)
inline

The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is, if the policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the TokenCode value is missing or expired, the AssumeRole call returns an "access denied" error.

The format for this parameter, as described by its regex pattern, is a sequence of six numeric digits.

Definition at line 1420 of file AssumeRoleRequest.h.

◆ WithTokenCode() [3/3]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithTokenCode ( const char *  value)
inline

The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is, if the policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the TokenCode value is missing or expired, the AssumeRole call returns an "access denied" error.

The format for this parameter, as described by its regex pattern, is a sequence of six numeric digits.

Definition at line 1430 of file AssumeRoleRequest.h.

◆ WithTransitiveTagKeys() [1/2]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithTransitiveTagKeys ( const Aws::Vector< Aws::String > &  value)
inline

A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain. For more information, see Chaining Roles with Session Tags in the IAM User Guide.

This parameter is optional. When you set session tags as transitive, the session policy and session tags packed binary limit is not affected.

If you choose not to specify a transitive tag key, then no tags are passed from this session to any subsequent sessions.

Definition at line 1039 of file AssumeRoleRequest.h.

◆ WithTransitiveTagKeys() [2/2]

AssumeRoleRequest& Aws::STS::Model::AssumeRoleRequest::WithTransitiveTagKeys ( Aws::Vector< Aws::String > &&  value)
inline

A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain. For more information, see Chaining Roles with Session Tags in the IAM User Guide.

This parameter is optional. When you set session tags as transitive, the session policy and session tags packed binary limit is not affected.

If you choose not to specify a transitive tag key, then no tags are passed from this session to any subsequent sessions.

Definition at line 1052 of file AssumeRoleRequest.h.


The documentation for this class was generated from the following file: