Class RoleInfo
- All Implemented Interfaces:
Cloneable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
A unique identifier that is used by third parties when assuming roles in their customers' accounts.Provides the credentials that are used to assume the role.The Amazon Resource Name (ARN) of the role to assume.An identifier for the assumed role session.int
hashCode()
void
setExternalId
(String externalId) A unique identifier that is used by third parties when assuming roles in their customers' accounts.void
setLongLivedCredentialsProvider
(AWSCredentialsProvider longLivedCredentialsProvider) Provides the credentials that are used to assume the role.void
setRoleArn
(String roleArn) The Amazon Resource Name (ARN) of the role to assume.void
setRoleSessionName
(String roleSessionName) An identifier for the assumed role session.toString()
Returns a string representation of this object; useful for testing and debugging.withExternalId
(String externalId) A unique identifier that is used by third parties when assuming roles in their customers' accounts.withLongLivedCredentials
(AWSCredentials longLivedCredentials) Provides the credentials that are used to assume the role.withLongLivedCredentialsProvider
(AWSCredentialsProvider longLivedCredentialsProvider) Provides the credentials that are used to assume the role.withRoleArn
(String roleArn) The Amazon Resource Name (ARN) of the role to assume.withRoleSessionName
(String roleSessionName) An identifier for the assumed role session.
-
Constructor Details
-
RoleInfo
public RoleInfo()Default constructor for RoleInfo object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
-
Method Details
-
setRoleArn
The Amazon Resource Name (ARN) of the role to assume.
- Parameters:
roleArn
- The Amazon Resource Name (ARN) of the role to assume.
-
getRoleArn
The Amazon Resource Name (ARN) of the role to assume.
- Returns:
- The Amazon Resource Name (ARN) of the role to assume.
-
withRoleArn
The Amazon Resource Name (ARN) of the role to assume.
- Parameters:
roleArn
- The Amazon Resource Name (ARN) of the role to assume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRoleSessionName
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 using the temporary security credentials will expose the role session name to the external account in their CloudTrail logs.
- Parameters:
roleSessionName
- 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 using the temporary security credentials will expose the role session name to the external account in their CloudTrail logs.
-
getRoleSessionName
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 using the temporary security credentials will expose the role session name to the external account in their CloudTrail logs.
- Returns:
- 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 using the temporary security credentials will expose the role session name to the external account in their CloudTrail logs.
-
withRoleSessionName
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 using the temporary security credentials will expose the role session name to the external account in their CloudTrail logs.
- Parameters:
roleSessionName
- 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 using the temporary security credentials will expose the role session name to the external account in their CloudTrail logs.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setExternalId
A unique identifier that is used by third parties when assuming roles in their customers' accounts. For each role that the third party can assume, they should instruct their customers to ensure the role's trust policy checks for the external ID that the third party generated. Each time the third party assumes the role, they should pass the customer's external ID. The external ID is useful in order to help third parties bind a role to the customer who created it. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the Using IAM.
- Parameters:
externalId
- A unique identifier that is used by third parties when assuming roles in their customers' accounts. For each role that the third party can assume, they should instruct their customers to ensure the role's trust policy checks for the external ID that the third party generated. Each time the third party assumes the role, they should pass the customer's external ID. The external ID is useful in order to help third parties bind a role to the customer who created it. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the Using IAM.
-
getExternalId
A unique identifier that is used by third parties when assuming roles in their customers' accounts. For each role that the third party can assume, they should instruct their customers to ensure the role's trust policy checks for the external ID that the third party generated. Each time the third party assumes the role, they should pass the customer's external ID. The external ID is useful in order to help third parties bind a role to the customer who created it. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the Using IAM.
- Returns:
- A unique identifier that is used by third parties when assuming roles in their customers' accounts. For each role that the third party can assume, they should instruct their customers to ensure the role's trust policy checks for the external ID that the third party generated. Each time the third party assumes the role, they should pass the customer's external ID. The external ID is useful in order to help third parties bind a role to the customer who created it. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the Using IAM.
-
withExternalId
A unique identifier that is used by third parties when assuming roles in their customers' accounts. For each role that the third party can assume, they should instruct their customers to ensure the role's trust policy checks for the external ID that the third party generated. Each time the third party assumes the role, they should pass the customer's external ID. The external ID is useful in order to help third parties bind a role to the customer who created it. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the Using IAM.
- Parameters:
externalId
- A unique identifier that is used by third parties when assuming roles in their customers' accounts. For each role that the third party can assume, they should instruct their customers to ensure the role's trust policy checks for the external ID that the third party generated. Each time the third party assumes the role, they should pass the customer's external ID. The external ID is useful in order to help third parties bind a role to the customer who created it. For more information about the external ID, see How to Use an External ID When Granting Access to Your AWS Resources to a Third Party in the Using IAM.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLongLivedCredentialsProvider
Provides the credentials that are used to assume the role.
- Parameters:
longLivedCredentialsProvider
- long lived credentials provider
-
getLongLivedCredentialsProvider
Provides the credentials that are used to assume the role.
- Returns:
- long lived credentials provider
-
withLongLivedCredentialsProvider
public RoleInfo withLongLivedCredentialsProvider(AWSCredentialsProvider longLivedCredentialsProvider) Provides the credentials that are used to assume the role.
- Parameters:
longLivedCredentialsProvider
- long lived credentials provider- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withLongLivedCredentials
Provides the credentials that are used to assume the role.
- Parameters:
longLivedCredentials
- long lived credentials- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-