Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.identitymanagement.model
Class CreateRoleRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.identitymanagement.model.CreateRoleRequest

public class CreateRoleRequest
extends AmazonWebServiceRequest

Container for the parameters to the 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 Using AWS Identity and Access Management .

The 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 . Currently, only EC2 instances can assume roles.

See Also:
AmazonIdentityManagement.createRole(CreateRoleRequest)

Constructor Summary
CreateRoleRequest()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAssumeRolePolicyDocument()
          The policy that grants an entity permission to assume the role.
 java.lang.String getPath()
          The path to the role.
 java.lang.String getRoleName()
          Name of the role to create.
 int hashCode()
           
 void setAssumeRolePolicyDocument(java.lang.String assumeRolePolicyDocument)
          The policy that grants an entity permission to assume the role.
 void setPath(java.lang.String path)
          The path to the role.
 void setRoleName(java.lang.String roleName)
          Name of the role to create.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateRoleRequest withAssumeRolePolicyDocument(java.lang.String assumeRolePolicyDocument)
          The policy that grants an entity permission to assume the role.
 CreateRoleRequest withPath(java.lang.String path)
          The path to the role.
 CreateRoleRequest withRoleName(java.lang.String roleName)
          Name of the role to create.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateRoleRequest

public CreateRoleRequest()
Method Detail

getPath

public java.lang.String getPath()
The path to the role. For more information about paths, see Identifiers for IAM Entities in Using AWS Identity and Access Management.

This parameter is optional. If it is not included, it defaults to a slash (/).

Constraints:
Length: 1 - 512
Pattern: (/)|(/[!-]+/)

Returns:
The path to the role. For more information about paths, see Identifiers for IAM Entities in Using AWS Identity and Access Management.

This parameter is optional. If it is not included, it defaults to a slash (/).


setPath

public void setPath(java.lang.String path)
The path to the role. For more information about paths, see Identifiers for IAM Entities in Using AWS Identity and Access Management.

This parameter is optional. If it is not included, it defaults to a slash (/).

Constraints:
Length: 1 - 512
Pattern: (/)|(/[!-]+/)

Parameters:
path - The path to the role. For more information about paths, see Identifiers for IAM Entities in Using AWS Identity and Access Management.

This parameter is optional. If it is not included, it defaults to a slash (/).


withPath

public CreateRoleRequest withPath(java.lang.String path)
The path to the role. For more information about paths, see Identifiers for IAM Entities in Using AWS Identity and Access Management.

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: (/)|(/[!-]+/)

Parameters:
path - The path to the role. For more information about paths, see Identifiers for IAM Entities in Using AWS Identity and Access Management.

This parameter is optional. If it is not included, it defaults to a slash (/).

Returns:
A reference to this updated object so that method calls can be chained together.

getRoleName

public java.lang.String getRoleName()
Name of the role to create.

Constraints:
Length: 1 - 64
Pattern: [\w+=,.@-]*

Returns:
Name of the role to create.

setRoleName

public void setRoleName(java.lang.String roleName)
Name of the role to create.

Constraints:
Length: 1 - 64
Pattern: [\w+=,.@-]*

Parameters:
roleName - Name of the role to create.

withRoleName

public CreateRoleRequest withRoleName(java.lang.String roleName)
Name of the role to create.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 64
Pattern: [\w+=,.@-]*

Parameters:
roleName - Name of the role to create.
Returns:
A reference to this updated object so that method calls can be chained together.

getAssumeRolePolicyDocument

public java.lang.String getAssumeRolePolicyDocument()
The policy that grants an entity permission to assume the role.

Constraints:
Length: 1 - 131072
Pattern: [ -?]+

Returns:
The policy that grants an entity permission to assume the role.

setAssumeRolePolicyDocument

public void setAssumeRolePolicyDocument(java.lang.String assumeRolePolicyDocument)
The policy that grants an entity permission to assume the role.

Constraints:
Length: 1 - 131072
Pattern: [ -?]+

Parameters:
assumeRolePolicyDocument - The policy that grants an entity permission to assume the role.

withAssumeRolePolicyDocument

public CreateRoleRequest withAssumeRolePolicyDocument(java.lang.String assumeRolePolicyDocument)
The policy that grants an entity permission to assume the role.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 131072
Pattern: [ -?]+

Parameters:
assumeRolePolicyDocument - The policy that grants an entity permission to assume the role.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.