@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Role extends Object implements Serializable, Cloneable
Contains information about an IAM role. This structure is returned as a response element in several API operations that interact with roles.
Constructor and Description |
---|
Role() |
Modifier and Type | Method and Description |
---|---|
Role |
clone() |
boolean |
equals(Object obj) |
String |
getArn()
The Amazon Resource Name (ARN) specifying the role.
|
String |
getAssumeRolePolicyDocument()
The policy that grants an entity permission to assume the role.
|
Date |
getCreateDate()
The date and time, in ISO 8601 date-time format, when the role was
created.
|
String |
getDescription()
A description of the role that you provide.
|
Integer |
getMaxSessionDuration()
The maximum session duration (in seconds) for the specified role.
|
String |
getPath()
The path to the role.
|
AttachedPermissionsBoundary |
getPermissionsBoundary()
The ARN of the policy used to set the permissions boundary for the role.
|
String |
getRoleId()
The stable and unique string identifying the role.
|
String |
getRoleName()
The friendly name that identifies the role.
|
List<Tag> |
getTags()
A list of tags that are attached to the specified role.
|
int |
hashCode() |
void |
setArn(String arn)
The Amazon Resource Name (ARN) specifying the role.
|
void |
setAssumeRolePolicyDocument(String assumeRolePolicyDocument)
The policy that grants an entity permission to assume the role.
|
void |
setCreateDate(Date createDate)
The date and time, in ISO 8601 date-time format, when the role was
created.
|
void |
setDescription(String description)
A description of the role that you provide.
|
void |
setMaxSessionDuration(Integer maxSessionDuration)
The maximum session duration (in seconds) for the specified role.
|
void |
setPath(String path)
The path to the role.
|
void |
setPermissionsBoundary(AttachedPermissionsBoundary permissionsBoundary)
The ARN of the policy used to set the permissions boundary for the role.
|
void |
setRoleId(String roleId)
The stable and unique string identifying the role.
|
void |
setRoleName(String roleName)
The friendly name that identifies the role.
|
void |
setTags(Collection<Tag> tags)
A list of tags that are attached to the specified role.
|
String |
toString()
Returns a string representation of this object.
|
Role |
withArn(String arn)
The Amazon Resource Name (ARN) specifying the role.
|
Role |
withAssumeRolePolicyDocument(String assumeRolePolicyDocument)
The policy that grants an entity permission to assume the role.
|
Role |
withCreateDate(Date createDate)
The date and time, in ISO 8601 date-time format, when the role was
created.
|
Role |
withDescription(String description)
A description of the role that you provide.
|
Role |
withMaxSessionDuration(Integer maxSessionDuration)
The maximum session duration (in seconds) for the specified role.
|
Role |
withPath(String path)
The path to the role.
|
Role |
withPermissionsBoundary(AttachedPermissionsBoundary permissionsBoundary)
The ARN of the policy used to set the permissions boundary for the role.
|
Role |
withRoleId(String roleId)
The stable and unique string identifying the role.
|
Role |
withRoleName(String roleName)
The friendly name that identifies the role.
|
Role |
withTags(Collection<Tag> tags)
A list of tags that are attached to the specified role.
|
Role |
withTags(Tag... tags)
A list of tags that are attached to the specified role.
|
public void setPath(String path)
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
path
- The path to the role. For more information about paths, see IAM Identifiers in the
Using IAM guide.public String getPath()
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
public Role withPath(String path)
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
path
- The path to the role. For more information about paths, see IAM Identifiers in the
Using IAM guide.public void setRoleName(String roleName)
The friendly name that identifies the role.
roleName
- The friendly name that identifies the role.public String getRoleName()
The friendly name that identifies the role.
public Role withRoleName(String roleName)
The friendly name that identifies the role.
roleName
- The friendly name that identifies the role.public void setRoleId(String roleId)
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
roleId
- The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the
Using IAM guide.public String getRoleId()
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
public Role withRoleId(String roleId)
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
roleId
- The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the
Using IAM guide.public void setArn(String arn)
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the IAM User Guide guide.
arn
- The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in
policies, see IAM
Identifiers in the IAM User Guide guide.public String getArn()
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the IAM User Guide guide.
public Role withArn(String arn)
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the IAM User Guide guide.
arn
- The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in
policies, see IAM
Identifiers in the IAM User Guide guide.public void setCreateDate(Date createDate)
The date and time, in ISO 8601 date-time format, when the role was created.
createDate
- The date and time, in ISO 8601 date-time format, when the
role was created.public Date getCreateDate()
The date and time, in ISO 8601 date-time format, when the role was created.
public Role withCreateDate(Date createDate)
The date and time, in ISO 8601 date-time format, when the role was created.
createDate
- The date and time, in ISO 8601 date-time format, when the
role was created.public void setAssumeRolePolicyDocument(String assumeRolePolicyDocument)
The policy that grants an entity permission to assume the role.
assumeRolePolicyDocument
- The policy that grants an entity permission to assume the role.public String getAssumeRolePolicyDocument()
The policy that grants an entity permission to assume the role.
public Role withAssumeRolePolicyDocument(String assumeRolePolicyDocument)
The policy that grants an entity permission to assume the role.
assumeRolePolicyDocument
- The policy that grants an entity permission to assume the role.public void setDescription(String description)
A description of the role that you provide.
description
- A description of the role that you provide.public String getDescription()
A description of the role that you provide.
public Role withDescription(String description)
A description of the role that you provide.
description
- A description of the role that you provide.public void setMaxSessionDuration(Integer maxSessionDuration)
The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume
the role can specify the duration using the optional DurationSeconds
API parameter or
duration-seconds
CLI parameter.
maxSessionDuration
- The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to
assume the role can specify the duration using the optional DurationSeconds
API parameter or
duration-seconds
CLI parameter.public Integer getMaxSessionDuration()
The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume
the role can specify the duration using the optional DurationSeconds
API parameter or
duration-seconds
CLI parameter.
DurationSeconds
API parameter or
duration-seconds
CLI parameter.public Role withMaxSessionDuration(Integer maxSessionDuration)
The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to assume
the role can specify the duration using the optional DurationSeconds
API parameter or
duration-seconds
CLI parameter.
maxSessionDuration
- The maximum session duration (in seconds) for the specified role. Anyone who uses the AWS CLI, or API to
assume the role can specify the duration using the optional DurationSeconds
API parameter or
duration-seconds
CLI parameter.public void setPermissionsBoundary(AttachedPermissionsBoundary permissionsBoundary)
The ARN of the policy used to set the permissions boundary for the role.
For more information about permissions boundaries, see Permissions Boundaries for IAM Identities in the IAM User Guide.
permissionsBoundary
- The ARN of the policy used to set the permissions boundary for the role.
For more information about permissions boundaries, see Permissions Boundaries for IAM Identities in the IAM User Guide.
public AttachedPermissionsBoundary getPermissionsBoundary()
The ARN of the policy used to set the permissions boundary for the role.
For more information about permissions boundaries, see Permissions Boundaries for IAM Identities in the IAM User Guide.
For more information about permissions boundaries, see Permissions Boundaries for IAM Identities in the IAM User Guide.
public Role withPermissionsBoundary(AttachedPermissionsBoundary permissionsBoundary)
The ARN of the policy used to set the permissions boundary for the role.
For more information about permissions boundaries, see Permissions Boundaries for IAM Identities in the IAM User Guide.
permissionsBoundary
- The ARN of the policy used to set the permissions boundary for the role.
For more information about permissions boundaries, see Permissions Boundaries for IAM Identities in the IAM User Guide.
public List<Tag> getTags()
A list of tags that are attached to the specified role. For more information about tagging, see Tagging IAM Identities in the IAM User Guide.
public void setTags(Collection<Tag> tags)
A list of tags that are attached to the specified role. For more information about tagging, see Tagging IAM Identities in the IAM User Guide.
tags
- A list of tags that are attached to the specified role. For more information about tagging, see Tagging IAM Identities in the
IAM User Guide.public Role withTags(Tag... tags)
A list of tags that are attached to the specified role. For more information about tagging, see Tagging IAM Identities in the IAM User Guide.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)
or withTags(java.util.Collection)
if you want to override the
existing values.
tags
- A list of tags that are attached to the specified role. For more information about tagging, see Tagging IAM Identities in the
IAM User Guide.public Role withTags(Collection<Tag> tags)
A list of tags that are attached to the specified role. For more information about tagging, see Tagging IAM Identities in the IAM User Guide.
tags
- A list of tags that are attached to the specified role. For more information about tagging, see Tagging IAM Identities in the
IAM User Guide.public String toString()
toString
in class Object
Object.toString()
Copyright © 2019. All rights reserved.