public class CreatePolicyRequest extends AmazonWebServiceRequest implements java.io.Serializable
Creates an AWS IoT policy.
The created policy is the default version for the policy. This operation creates a policy version with a version identifier of 1 and sets 1 as the policy's default version.
| Constructor and Description | 
|---|
| CreatePolicyRequest() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(java.lang.Object obj) | 
| java.lang.String | getPolicyDocument()
 The JSON document that describes the policy. | 
| java.lang.String | getPolicyName()
 The policy name. | 
| java.util.List<Tag> | getTags()
 Metadata which can be used to manage the policy. | 
| int | hashCode() | 
| void | setPolicyDocument(java.lang.String policyDocument)
 The JSON document that describes the policy. | 
| void | setPolicyName(java.lang.String policyName)
 The policy name. | 
| void | setTags(java.util.Collection<Tag> tags)
 Metadata which can be used to manage the policy. | 
| java.lang.String | toString()Returns a string representation of this object; useful for testing and
 debugging. | 
| CreatePolicyRequest | withPolicyDocument(java.lang.String policyDocument)
 The JSON document that describes the policy. | 
| CreatePolicyRequest | withPolicyName(java.lang.String policyName)
 The policy name. | 
| CreatePolicyRequest | withTags(java.util.Collection<Tag> tags)
 Metadata which can be used to manage the policy. | 
| CreatePolicyRequest | withTags(Tag... tags)
 Metadata which can be used to manage the policy. | 
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic java.lang.String getPolicyName()
The policy name.
 Constraints:
 Length: 1 - 128
 Pattern: [\w+=,.@-]+
The policy name.
public void setPolicyName(java.lang.String policyName)
The policy name.
 Constraints:
 Length: 1 - 128
 Pattern: [\w+=,.@-]+
policyName - The policy name.
public CreatePolicyRequest withPolicyName(java.lang.String policyName)
The policy name.
Returns a reference to this object so that method calls can be chained together.
 Constraints:
 Length: 1 - 128
 Pattern: [\w+=,.@-]+
policyName - The policy name.
public java.lang.String getPolicyDocument()
The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
public void setPolicyDocument(java.lang.String policyDocument)
The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
policyDocument - The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
public CreatePolicyRequest withPolicyDocument(java.lang.String policyDocument)
The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
Returns a reference to this object so that method calls can be chained together.
policyDocument - The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
public java.util.List<Tag> getTags()
Metadata which can be used to manage the policy.
For URI Request parameters use format: ...key1=value1&key2=value2...
For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
Metadata which can be used to manage the policy.
For URI Request parameters use format: ...key1=value1&key2=value2...
For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
public void setTags(java.util.Collection<Tag> tags)
Metadata which can be used to manage the policy.
For URI Request parameters use format: ...key1=value1&key2=value2...
For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
tags - Metadata which can be used to manage the policy.
For URI Request parameters use format: ...key1=value1&key2=value2...
For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
public CreatePolicyRequest withTags(Tag... tags)
Metadata which can be used to manage the policy.
For URI Request parameters use format: ...key1=value1&key2=value2...
For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
Returns a reference to this object so that method calls can be chained together.
tags - Metadata which can be used to manage the policy.
For URI Request parameters use format: ...key1=value1&key2=value2...
For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
public CreatePolicyRequest withTags(java.util.Collection<Tag> tags)
Metadata which can be used to manage the policy.
For URI Request parameters use format: ...key1=value1&key2=value2...
For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
Returns a reference to this object so that method calls can be chained together.
tags - Metadata which can be used to manage the policy.
For URI Request parameters use format: ...key1=value1&key2=value2...
For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.