public class CreatePolicyVersionRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
CreatePolicyVersion operation
.
Creates a new version of the specified managed policy. To update a managed policy, you create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must delete an existing version using DeletePolicyVersion before you create a new version.
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 IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
NOOP
Constructor and Description |
---|
CreatePolicyVersionRequest() |
Modifier and Type | Method and Description |
---|---|
CreatePolicyVersionRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
String |
getPolicyArn()
The Amazon Resource Name (ARN).
|
String |
getPolicyDocument()
The policy document.
|
Boolean |
getSetAsDefault()
Specifies whether to set this version as the policy's default version.
|
int |
hashCode() |
Boolean |
isSetAsDefault()
Specifies whether to set this version as the policy's default version.
|
void |
setPolicyArn(String policyArn)
The Amazon Resource Name (ARN).
|
void |
setPolicyDocument(String policyDocument)
The policy document.
|
void |
setSetAsDefault(Boolean setAsDefault)
Specifies whether to set this version as the policy's default version.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreatePolicyVersionRequest |
withPolicyArn(String policyArn)
The Amazon Resource Name (ARN).
|
CreatePolicyVersionRequest |
withPolicyDocument(String policyDocument)
The policy document.
|
CreatePolicyVersionRequest |
withSetAsDefault(Boolean setAsDefault)
Specifies whether to set this version as the policy's default version.
|
copyBaseTo, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public String getPolicyArn()
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Constraints:
Length: 20 - 2048
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
public void setPolicyArn(String policyArn)
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Constraints:
Length: 20 - 2048
policyArn
- The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS
resources. For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
public CreatePolicyVersionRequest withPolicyArn(String policyArn)
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 20 - 2048
policyArn
- The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS
resources. For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
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 CreatePolicyVersionRequest 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 Boolean isSetAsDefault()
When this parameter is true
, the new policy version
becomes the operative version; that is, the version that is in effect
for the IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
When this parameter is true
, the new policy version
becomes the operative version; that is, the version that is in effect
for the IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
public void setSetAsDefault(Boolean setAsDefault)
When this parameter is true
, the new policy version
becomes the operative version; that is, the version that is in effect
for the IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
setAsDefault
- Specifies whether to set this version as the policy's default version.
When this parameter is true
, the new policy version
becomes the operative version; that is, the version that is in effect
for the IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
public CreatePolicyVersionRequest withSetAsDefault(Boolean setAsDefault)
When this parameter is true
, the new policy version
becomes the operative version; that is, the version that is in effect
for the IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
Returns a reference to this object so that method calls can be chained together.
setAsDefault
- Specifies whether to set this version as the policy's default version.
When this parameter is true
, the new policy version
becomes the operative version; that is, the version that is in effect
for the IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
public Boolean getSetAsDefault()
When this parameter is true
, the new policy version
becomes the operative version; that is, the version that is in effect
for the IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
When this parameter is true
, the new policy version
becomes the operative version; that is, the version that is in effect
for the IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
public String toString()
toString
in class Object
Object.toString()
public CreatePolicyVersionRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.