AWS SDK for C++  1.9.69
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)
 
const Aws::StringGetSourceIdentity () const
 
bool SourceIdentityHasBeenSet () const
 
void SetSourceIdentity (const Aws::String &value)
 
void SetSourceIdentity (Aws::String &&value)
 
void SetSourceIdentity (const char *value)
 
AssumeRoleRequestWithSourceIdentity (const Aws::String &value)
 
AssumeRoleRequestWithSourceIdentity (Aws::String &&value)
 
AssumeRoleRequestWithSourceIdentity (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 plaintext 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 Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 391 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 plaintext 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 Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 418 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 STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plaintext 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 Amazon Web Services 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 plaintext 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 CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 950 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 STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plaintext 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 Amazon Web Services 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 plaintext 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 CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 985 of file AssumeRoleRequest.h.

◆ AddTransitiveTagKeys() [1/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 1090 of file AssumeRoleRequest.h.

◆ AddTransitiveTagKeys() [2/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 1077 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 1103 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 specified can can range from 900 seconds (15 minutes) up to the maximum session duration that is set for the role. The maximum session duration setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting or the administrator setting (whichever is lower), 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 Management Console in the IAM User Guide.

Definition at line 658 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 Amazon Web Services 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 1142 of file AssumeRoleRequest.h.

◆ GetDurationSeconds()

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

The duration, in seconds, of the role session. The value specified can can range from 900 seconds (15 minutes) up to the maximum session duration that is set for the role. The maximum session duration setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting or the administrator setting (whichever is lower), 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 Management Console in the IAM User Guide.

Definition at line 635 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 Amazon Web Services 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 1123 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 Amazon Web Services 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 plaintext 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 (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.

An Amazon Web Services 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 plaintext 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 443 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 plaintext 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 Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 229 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 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 1270 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.

◆ GetSourceIdentity()

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

The source identity specified by the principal that is calling the AssumeRole operation.

You can require users to specify a source identity when they assume a role. You do this by using the sts:SourceIdentity condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the aws:SourceIdentity condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see Monitor and control actions taken with assumed roles 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: =,.-. You cannot use a value that begins with the text aws:. This prefix is reserved for Amazon Web Services internal use.

Definition at line 1462 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 STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plaintext 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 Amazon Web Services 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 plaintext 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 CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 740 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. (In other words, 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 1372 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 999 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 plaintext 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 Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 256 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 Amazon Web Services 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 plaintext 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 (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.

An Amazon Web Services 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 plaintext 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 467 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 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 1283 of file AssumeRoleRequest.h.

◆ SetDurationSeconds()

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

The duration, in seconds, of the role session. The value specified can can range from 900 seconds (15 minutes) up to the maximum session duration that is set for the role. The maximum session duration setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting or the administrator setting (whichever is lower), 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 Management Console in the IAM User Guide.

Definition at line 681 of file AssumeRoleRequest.h.

◆ SetExternalId() [1/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 Amazon Web Services 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 1180 of file AssumeRoleRequest.h.

◆ SetExternalId() [2/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 Amazon Web Services 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 1161 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 Amazon Web Services 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 1199 of file AssumeRoleRequest.h.

◆ SetPolicy() [1/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 Amazon Web Services 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 plaintext 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 (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.

An Amazon Web Services 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 plaintext 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 515 of file AssumeRoleRequest.h.

◆ SetPolicy() [2/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 Amazon Web Services 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 plaintext 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 (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.

An Amazon Web Services 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 plaintext 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 491 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 Amazon Web Services 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 plaintext 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 (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.

An Amazon Web Services 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 plaintext 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 539 of file AssumeRoleRequest.h.

◆ SetPolicyArns() [1/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 plaintext 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 Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 310 of file AssumeRoleRequest.h.

◆ SetPolicyArns() [2/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 plaintext 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 Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 283 of file AssumeRoleRequest.h.

◆ SetRoleArn() [1/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() [2/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() [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 ( 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 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() [2/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 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() [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 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 ( 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 1309 of file AssumeRoleRequest.h.

◆ SetSerialNumber() [2/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 1296 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 1322 of file AssumeRoleRequest.h.

◆ SetSourceIdentity() [1/3]

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

The source identity specified by the principal that is calling the AssumeRole operation.

You can require users to specify a source identity when they assume a role. You do this by using the sts:SourceIdentity condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the aws:SourceIdentity condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see Monitor and control actions taken with assumed roles 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: =,.-. You cannot use a value that begins with the text aws:. This prefix is reserved for Amazon Web Services internal use.

Definition at line 1519 of file AssumeRoleRequest.h.

◆ SetSourceIdentity() [2/3]

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

The source identity specified by the principal that is calling the AssumeRole operation.

You can require users to specify a source identity when they assume a role. You do this by using the sts:SourceIdentity condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the aws:SourceIdentity condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see Monitor and control actions taken with assumed roles 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: =,.-. You cannot use a value that begins with the text aws:. This prefix is reserved for Amazon Web Services internal use.

Definition at line 1500 of file AssumeRoleRequest.h.

◆ SetSourceIdentity() [3/3]

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

The source identity specified by the principal that is calling the AssumeRole operation.

You can require users to specify a source identity when they assume a role. You do this by using the sts:SourceIdentity condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the aws:SourceIdentity condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see Monitor and control actions taken with assumed roles 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: =,.-. You cannot use a value that begins with the text aws:. This prefix is reserved for Amazon Web Services internal use.

Definition at line 1538 of file AssumeRoleRequest.h.

◆ SetTags() [1/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 STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plaintext 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 Amazon Web Services 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 plaintext 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 CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 845 of file AssumeRoleRequest.h.

◆ SetTags() [2/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 STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plaintext 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 Amazon Web Services 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 plaintext 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 CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 810 of file AssumeRoleRequest.h.

◆ SetTokenCode() [1/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. (In other words, 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 1402 of file AssumeRoleRequest.h.

◆ SetTokenCode() [2/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. (In other words, 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 1392 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. (In other words, 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 1412 of file AssumeRoleRequest.h.

◆ SetTransitiveTagKeys() [1/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 1038 of file AssumeRoleRequest.h.

◆ SetTransitiveTagKeys() [2/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 1025 of file AssumeRoleRequest.h.

◆ SourceIdentityHasBeenSet()

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

The source identity specified by the principal that is calling the AssumeRole operation.

You can require users to specify a source identity when they assume a role. You do this by using the sts:SourceIdentity condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the aws:SourceIdentity condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see Monitor and control actions taken with assumed roles 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: =,.-. You cannot use a value that begins with the text aws:. This prefix is reserved for Amazon Web Services internal use.

Definition at line 1481 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 STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plaintext 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 Amazon Web Services 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 plaintext 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 CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 775 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. (In other words, 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 1382 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 1012 of file AssumeRoleRequest.h.

◆ WithDurationSeconds()

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

The duration, in seconds, of the role session. The value specified can can range from 900 seconds (15 minutes) up to the maximum session duration that is set for the role. The maximum session duration setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting or the administrator setting (whichever is lower), 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 Management Console in the IAM User Guide.

Definition at line 704 of file AssumeRoleRequest.h.

◆ WithExternalId() [1/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 Amazon Web Services 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 1237 of file AssumeRoleRequest.h.

◆ WithExternalId() [2/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 Amazon Web Services 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 1218 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 Amazon Web Services 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 1256 of file AssumeRoleRequest.h.

◆ WithPolicy() [1/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 Amazon Web Services 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 plaintext 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 (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.

An Amazon Web Services 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 plaintext 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 587 of file AssumeRoleRequest.h.

◆ WithPolicy() [2/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 Amazon Web Services 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 plaintext 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 (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.

An Amazon Web Services 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 plaintext 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 563 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 Amazon Web Services 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 plaintext 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 (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.

An Amazon Web Services 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 plaintext 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 611 of file AssumeRoleRequest.h.

◆ WithPolicyArns() [1/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 plaintext 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 Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 364 of file AssumeRoleRequest.h.

◆ WithPolicyArns() [2/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 plaintext 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 Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 337 of file AssumeRoleRequest.h.

◆ WithRoleArn() [1/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() [2/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() [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 ( 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 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() [2/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 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() [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 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 ( 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 1348 of file AssumeRoleRequest.h.

◆ WithSerialNumber() [2/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 1335 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 1361 of file AssumeRoleRequest.h.

◆ WithSourceIdentity() [1/3]

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

The source identity specified by the principal that is calling the AssumeRole operation.

You can require users to specify a source identity when they assume a role. You do this by using the sts:SourceIdentity condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the aws:SourceIdentity condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see Monitor and control actions taken with assumed roles 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: =,.-. You cannot use a value that begins with the text aws:. This prefix is reserved for Amazon Web Services internal use.

Definition at line 1576 of file AssumeRoleRequest.h.

◆ WithSourceIdentity() [2/3]

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

The source identity specified by the principal that is calling the AssumeRole operation.

You can require users to specify a source identity when they assume a role. You do this by using the sts:SourceIdentity condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the aws:SourceIdentity condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see Monitor and control actions taken with assumed roles 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: =,.-. You cannot use a value that begins with the text aws:. This prefix is reserved for Amazon Web Services internal use.

Definition at line 1557 of file AssumeRoleRequest.h.

◆ WithSourceIdentity() [3/3]

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

The source identity specified by the principal that is calling the AssumeRole operation.

You can require users to specify a source identity when they assume a role. You do this by using the sts:SourceIdentity condition key in a role trust policy. You can use source identity information in CloudTrail logs to determine who took actions with a role. You can use the aws:SourceIdentity condition key to further control access to Amazon Web Services resources based on the value of source identity. For more information about using source identity, see Monitor and control actions taken with assumed roles 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: =,.-. You cannot use a value that begins with the text aws:. This prefix is reserved for Amazon Web Services internal use.

Definition at line 1595 of file AssumeRoleRequest.h.

◆ WithTags() [1/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 STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plaintext 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 Amazon Web Services 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 plaintext 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 CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 915 of file AssumeRoleRequest.h.

◆ WithTags() [2/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 STS Sessions in the IAM User Guide.

This parameter is optional. You can pass up to 50 session tags. The plaintext 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 Amazon Web Services 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 plaintext 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 CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the IAM User Guide.

Definition at line 880 of file AssumeRoleRequest.h.

◆ WithTokenCode() [1/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. (In other words, 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 1432 of file AssumeRoleRequest.h.

◆ WithTokenCode() [2/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. (In other words, 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 1422 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. (In other words, 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 1442 of file AssumeRoleRequest.h.

◆ WithTransitiveTagKeys() [1/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 1064 of file AssumeRoleRequest.h.

◆ WithTransitiveTagKeys() [2/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 1051 of file AssumeRoleRequest.h.


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