public class CreatePolicyVersionRequest extends AmazonWebServiceRequest implements java.io.Serializable
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(java.lang.Object obj) |
java.lang.String |
getPolicyDocument()
The JSON document that describes the policy.
|
java.lang.String |
getPolicyName()
The policy name.
|
java.lang.Boolean |
getSetAsDefault()
Specifies whether the policy version is set as the default.
|
int |
hashCode() |
java.lang.Boolean |
isSetAsDefault()
Specifies whether the policy version is set as the default.
|
void |
setPolicyDocument(java.lang.String policyDocument)
The JSON document that describes the policy.
|
void |
setPolicyName(java.lang.String policyName)
The policy name.
|
void |
setSetAsDefault(java.lang.Boolean setAsDefault)
Specifies whether the policy version is set as the default.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreatePolicyVersionRequest |
withPolicyDocument(java.lang.String policyDocument)
The JSON document that describes the policy.
|
CreatePolicyVersionRequest |
withPolicyName(java.lang.String policyName)
The policy name.
|
CreatePolicyVersionRequest |
withSetAsDefault(java.lang.Boolean setAsDefault)
Specifies whether the policy version is set as the default.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public 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 CreatePolicyVersionRequest 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. Minimum length of 1. Maximum length of 2048, excluding whitespace.
The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.
public void setPolicyDocument(java.lang.String policyDocument)
The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.
policyDocument
- The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.
public CreatePolicyVersionRequest withPolicyDocument(java.lang.String policyDocument)
The JSON document that describes the policy. Minimum length of 1. 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. Minimum length of 1. Maximum length of 2048, excluding whitespace.
public java.lang.Boolean isSetAsDefault()
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).
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 java.lang.Boolean getSetAsDefault()
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).
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 void setSetAsDefault(java.lang.Boolean 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).
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(java.lang.Boolean 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).
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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.