public class CreatePolicyRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
CreatePolicy operation
.
Creates a new managed policy for your AWS account.
This operation creates a policy version with a version identifier of
v1
and sets v1 as the policy's default version. For more
information about policy versions, see
Versioning for Managed Policies
in the Using IAM guide.
For more information about managed policies in general, refer to Managed Policies and Inline Policies in the Using IAM guide.
NOOP
Constructor and Description |
---|
CreatePolicyRequest() |
Modifier and Type | Method and Description |
---|---|
CreatePolicyRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
String |
getDescription()
A friendly description of the policy.
|
String |
getPath()
The path for the policy.
|
String |
getPolicyDocument()
The policy document.
|
String |
getPolicyName()
The name of the policy document.
|
int |
hashCode() |
void |
setDescription(String description)
A friendly description of the policy.
|
void |
setPath(String path)
The path for the policy.
|
void |
setPolicyDocument(String policyDocument)
The policy document.
|
void |
setPolicyName(String policyName)
The name of the policy document.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreatePolicyRequest |
withDescription(String description)
A friendly description of the policy.
|
CreatePolicyRequest |
withPath(String path)
The path for the policy.
|
CreatePolicyRequest |
withPolicyDocument(String policyDocument)
The policy document.
|
CreatePolicyRequest |
withPolicyName(String policyName)
The name of the policy document.
|
copyBaseTo, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public String getPolicyName()
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]+
public void setPolicyName(String policyName)
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]+
policyName
- The name of the policy document.public CreatePolicyRequest withPolicyName(String policyName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]+
policyName
- The name of the policy document.public String getPath()
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 (/).
Constraints:
Pattern: ((/[A-Za-z0-9\.,\+@=_-]+)*)/
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 void setPath(String path)
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 (/).
Constraints:
Pattern: ((/[A-Za-z0-9\.,\+@=_-]+)*)/
path
- The path for the policy. 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 CreatePolicyRequest withPath(String path)
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 (/).
Returns a reference to this object so that method calls can be chained together.
Constraints:
Pattern: ((/[A-Za-z0-9\.,\+@=_-]+)*)/
path
- The path for the policy. 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 getPolicyDocument()
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
public void setPolicyDocument(String policyDocument)
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
policyDocument
- The policy document.public CreatePolicyRequest withPolicyDocument(String policyDocument)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
policyDocument
- The policy document.public String getDescription()
Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."
The policy description is immutable. After a value is assigned, it cannot be changed.
Constraints:
Length: 0 - 1000
Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."
The policy description is immutable. After a value is assigned, it cannot be changed.
public void setDescription(String description)
Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."
The policy description is immutable. After a value is assigned, it cannot be changed.
Constraints:
Length: 0 - 1000
description
- A friendly description of the policy. Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."
The policy description is immutable. After a value is assigned, it cannot be changed.
public CreatePolicyRequest withDescription(String description)
Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."
The policy description is immutable. After a value is assigned, it cannot be changed.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 1000
description
- A friendly description of the policy. Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."
The policy description is immutable. After a value is assigned, it cannot be changed.
public String toString()
toString
in class Object
Object.toString()
public CreatePolicyRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.