public class CreateRoleRequest extends AmazonWebServiceRequest implements Serializable
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 Using IAM guide.
The example policy grants permission to an EC2 instance to assume the role. The policy is URL-encoded according to RFC 3986. For more information about RFC 3986, go to http://www.faqs.org/rfcs/rfc3986.html .
NOOP
Constructor and Description |
---|
CreateRoleRequest() |
Modifier and Type | Method and Description |
---|---|
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()
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)
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)
Name of the role to create.
|
copyPrivateRequestParameters, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, 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 Identifiers
for IAM Entities 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 Identifiers
for IAM Entities 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
- 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
- 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()
Copyright © 2014. All rights reserved.