@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class CreatePolicyRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP
Constructor and Description |
---|
CreatePolicyRequest() |
Modifier and Type | Method and Description |
---|---|
CreatePolicyRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
String |
getContent()
The policy text content to add to the new policy.
|
String |
getDescription()
An optional description to assign to the policy.
|
String |
getName()
The friendly name to assign to the policy.
|
List<Tag> |
getTags()
A list of tags that you want to attach to the newly created policy.
|
String |
getType()
The type of policy to create.
|
int |
hashCode() |
void |
setContent(String content)
The policy text content to add to the new policy.
|
void |
setDescription(String description)
An optional description to assign to the policy.
|
void |
setName(String name)
The friendly name to assign to the policy.
|
void |
setTags(Collection<Tag> tags)
A list of tags that you want to attach to the newly created policy.
|
void |
setType(PolicyType type)
The type of policy to create.
|
void |
setType(String type)
The type of policy to create.
|
String |
toString()
Returns a string representation of this object.
|
CreatePolicyRequest |
withContent(String content)
The policy text content to add to the new policy.
|
CreatePolicyRequest |
withDescription(String description)
An optional description to assign to the policy.
|
CreatePolicyRequest |
withName(String name)
The friendly name to assign to the policy.
|
CreatePolicyRequest |
withTags(Collection<Tag> tags)
A list of tags that you want to attach to the newly created policy.
|
CreatePolicyRequest |
withTags(Tag... tags)
A list of tags that you want to attach to the newly created policy.
|
CreatePolicyRequest |
withType(PolicyType type)
The type of policy to create.
|
CreatePolicyRequest |
withType(String type)
The type of policy to create.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public void setContent(String content)
The policy text content to add to the new policy. The text that you supply must adhere to the rules of the policy
type you specify in the Type
parameter.
The maximum size of a policy document depends on the policy's type. For more information, see Maximum and minimum values in the Organizations User Guide.
content
- The policy text content to add to the new policy. The text that you supply must adhere to the rules of the
policy type you specify in the Type
parameter.
The maximum size of a policy document depends on the policy's type. For more information, see Maximum and minimum values in the Organizations User Guide.
public String getContent()
The policy text content to add to the new policy. The text that you supply must adhere to the rules of the policy
type you specify in the Type
parameter.
The maximum size of a policy document depends on the policy's type. For more information, see Maximum and minimum values in the Organizations User Guide.
Type
parameter.
The maximum size of a policy document depends on the policy's type. For more information, see Maximum and minimum values in the Organizations User Guide.
public CreatePolicyRequest withContent(String content)
The policy text content to add to the new policy. The text that you supply must adhere to the rules of the policy
type you specify in the Type
parameter.
The maximum size of a policy document depends on the policy's type. For more information, see Maximum and minimum values in the Organizations User Guide.
content
- The policy text content to add to the new policy. The text that you supply must adhere to the rules of the
policy type you specify in the Type
parameter.
The maximum size of a policy document depends on the policy's type. For more information, see Maximum and minimum values in the Organizations User Guide.
public void setDescription(String description)
An optional description to assign to the policy.
description
- An optional description to assign to the policy.public String getDescription()
An optional description to assign to the policy.
public CreatePolicyRequest withDescription(String description)
An optional description to assign to the policy.
description
- An optional description to assign to the policy.public void setName(String name)
The friendly name to assign to the policy.
The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
name
- The friendly name to assign to the policy.
The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
public String getName()
The friendly name to assign to the policy.
The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
public CreatePolicyRequest withName(String name)
The friendly name to assign to the policy.
The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
name
- The friendly name to assign to the policy.
The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
public void setType(String type)
The type of policy to create. You can specify one of the following values:
type
- The type of policy to create. You can specify one of the following values:
PolicyType
public String getType()
The type of policy to create. You can specify one of the following values:
PolicyType
public CreatePolicyRequest withType(String type)
The type of policy to create. You can specify one of the following values:
type
- The type of policy to create. You can specify one of the following values:
PolicyType
public void setType(PolicyType type)
The type of policy to create. You can specify one of the following values:
type
- The type of policy to create. You can specify one of the following values:
PolicyType
public CreatePolicyRequest withType(PolicyType type)
The type of policy to create. You can specify one of the following values:
type
- The type of policy to create. You can specify one of the following values:
PolicyType
public List<Tag> getTags()
A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify
both a tag key and a value. You can set the value to an empty string, but you can't set it to null
.
For more information about tagging, see Tagging Organizations
resources in the Organizations User Guide.
If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
null
. For more information about tagging, see Tagging Organizations
resources in the Organizations User Guide. If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
public void setTags(Collection<Tag> tags)
A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify
both a tag key and a value. You can set the value to an empty string, but you can't set it to null
.
For more information about tagging, see Tagging Organizations
resources in the Organizations User Guide.
If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
tags
- A list of tags that you want to attach to the newly created policy. For each tag in the list, you must
specify both a tag key and a value. You can set the value to an empty string, but you can't set it to
null
. For more information about tagging, see Tagging Organizations
resources in the Organizations User Guide. If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
public CreatePolicyRequest withTags(Tag... tags)
A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify
both a tag key and a value. You can set the value to an empty string, but you can't set it to null
.
For more information about tagging, see Tagging Organizations
resources in the Organizations User Guide.
If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
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 you want to attach to the newly created policy. For each tag in the list, you must
specify both a tag key and a value. You can set the value to an empty string, but you can't set it to
null
. For more information about tagging, see Tagging Organizations
resources in the Organizations User Guide. If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
public CreatePolicyRequest withTags(Collection<Tag> tags)
A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify
both a tag key and a value. You can set the value to an empty string, but you can't set it to null
.
For more information about tagging, see Tagging Organizations
resources in the Organizations User Guide.
If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
tags
- A list of tags that you want to attach to the newly created policy. For each tag in the list, you must
specify both a tag key and a value. You can set the value to an empty string, but you can't set it to
null
. For more information about tagging, see Tagging Organizations
resources in the Organizations User Guide. If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
public String toString()
toString
in class Object
Object.toString()
public CreatePolicyRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()