public class CreateRoleRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
CreateRole operation
.
Creates a new role for your AWS account. For more information about roles, go to Working with Roles . For information about limitations on role names and the number of roles you can create, go to Limitations on IAM Entities in the IAM User Guide .
The policy in the following example grants permission to an EC2 instance to assume the role.
NOOP
Constructor and Description |
---|
CreateRoleRequest() |
Modifier and Type | Method and Description |
---|---|
CreateRoleRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
String |
getAssumeRolePolicyDocument()
The policy that grants an entity permission to assume the role.
|
String |
getPath()
The path to the role.
|
String |
getRoleName()
The name of the role to create.
|
int |
hashCode() |
void |
setAssumeRolePolicyDocument(String assumeRolePolicyDocument)
The policy that grants an entity permission to assume the role.
|
void |
setPath(String path)
The path to the role.
|
void |
setRoleName(String roleName)
The name of the role to create.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateRoleRequest |
withAssumeRolePolicyDocument(String assumeRolePolicyDocument)
The policy that grants an entity permission to assume the role.
|
CreateRoleRequest |
withPath(String path)
The path to the role.
|
CreateRoleRequest |
withRoleName(String roleName)
The name of the role to create.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public String getPath()
This parameter is optional. If it is not included, it defaults to a slash (/).
Constraints:
Length: 1 - 512
Pattern: (\u002F)|(\u002F[\u0021-\u007F]+\u002F)
This parameter is optional. If it is not included, it defaults to a slash (/).
public void setPath(String path)
This parameter is optional. If it is not included, it defaults to a slash (/).
Constraints:
Length: 1 - 512
Pattern: (\u002F)|(\u002F[\u0021-\u007F]+\u002F)
path
- The path to the role. For more information about paths, see IAM
Identifiers in the Using IAM guide. This parameter is optional. If it is not included, it defaults to a slash (/).
public CreateRoleRequest withPath(String path)
This parameter is optional. If it is not included, it defaults to a slash (/).
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 512
Pattern: (\u002F)|(\u002F[\u0021-\u007F]+\u002F)
path
- The path to the role. For more information about paths, see IAM
Identifiers in the Using IAM guide. This parameter is optional. If it is not included, it defaults to a slash (/).
public String getRoleName()
Constraints:
Length: 1 - 64
Pattern: [\w+=,.@-]+
public void setRoleName(String roleName)
Constraints:
Length: 1 - 64
Pattern: [\w+=,.@-]+
roleName
- The name of the role to create.public CreateRoleRequest withRoleName(String roleName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 64
Pattern: [\w+=,.@-]+
roleName
- The name of the role to create.public String getAssumeRolePolicyDocument()
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
public void setAssumeRolePolicyDocument(String assumeRolePolicyDocument)
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
assumeRolePolicyDocument
- The policy that grants an entity permission to assume the role.public CreateRoleRequest withAssumeRolePolicyDocument(String assumeRolePolicyDocument)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
assumeRolePolicyDocument
- The policy that grants an entity permission to assume the role.public String toString()
toString
in class Object
Object.toString()
public CreateRoleRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.