public class CreatePolicyVersionRequest extends AmazonWebServiceRequest implements Serializable
CreatePolicyVersion operation.
Creates a new version of the specified AWS IoT policy. To update a policy, create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must use DeletePolicyVersion to delete an existing version before you create a new one.
Optionally, you can set the new version as the policy's default version. The default version is the operative version (that is, the version that is in effect for the certificates to which the policy is attached).
| Constructor and Description |
|---|
CreatePolicyVersionRequest() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getPolicyDocument()
The JSON document that describes the policy.
|
String |
getPolicyName()
The policy name.
|
Boolean |
getSetAsDefault()
Specifies whether the policy version is set as the default.
|
int |
hashCode() |
Boolean |
isSetAsDefault()
Specifies whether the policy version is set as the default.
|
void |
setPolicyDocument(String policyDocument)
The JSON document that describes the policy.
|
void |
setPolicyName(String policyName)
The policy name.
|
void |
setSetAsDefault(Boolean setAsDefault)
Specifies whether the policy version is set as the default.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreatePolicyVersionRequest |
withPolicyDocument(String policyDocument)
The JSON document that describes the policy.
|
CreatePolicyVersionRequest |
withPolicyName(String policyName)
The policy name.
|
CreatePolicyVersionRequest |
withSetAsDefault(Boolean setAsDefault)
Specifies whether the policy version is set as the default.
|
getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollectorpublic String getPolicyName()
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]+
public void setPolicyName(String policyName)
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]+
policyName - The policy name.public CreatePolicyVersionRequest 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 policy name.public String getPolicyDocument()
public void setPolicyDocument(String policyDocument)
policyDocument - The JSON document that describes the policy. Minimum length of 1.
Maximum length of 2048, excluding whitespacespublic CreatePolicyVersionRequest withPolicyDocument(String policyDocument)
Returns a reference to this object so that method calls can be chained together.
policyDocument - The JSON document that describes the policy. Minimum length of 1.
Maximum length of 2048, excluding whitespacespublic Boolean isSetAsDefault()
public void setSetAsDefault(Boolean setAsDefault)
setAsDefault - Specifies whether the policy version is set as the default. When this
parameter is true, the new policy version becomes the operative
version (that is, the version that is in effect for the certificates
to which the policy is attached).public CreatePolicyVersionRequest withSetAsDefault(Boolean setAsDefault)
Returns a reference to this object so that method calls can be chained together.
setAsDefault - Specifies whether the policy version is set as the default. When this
parameter is true, the new policy version becomes the operative
version (that is, the version that is in effect for the certificates
to which the policy is attached).public Boolean getSetAsDefault()
public String toString()
toString in class ObjectObject.toString()Copyright © 2016. All rights reserved.