public class PolicyVersion extends Object implements Serializable, Cloneable
Contains information about a version of a managed policy.
This data type is used as a response element in the CreatePolicyVersion, GetPolicyVersion, ListPolicyVersions, and GetAccountAuthorizationDetails actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
Constructor and Description |
---|
PolicyVersion() |
Modifier and Type | Method and Description |
---|---|
PolicyVersion |
clone() |
boolean |
equals(Object obj) |
Date |
getCreateDate()
The date and time, in ISO
8601 date-time format, when the policy version was created.
|
String |
getDocument()
The policy document.
|
Boolean |
getIsDefaultVersion()
Specifies whether the policy version is set as the policy's default
version.
|
String |
getVersionId()
The identifier for the policy version.
|
int |
hashCode() |
Boolean |
isDefaultVersion()
Specifies whether the policy version is set as the policy's default
version.
|
void |
setCreateDate(Date createDate)
The date and time, in ISO
8601 date-time format, when the policy version was created.
|
void |
setDocument(String document)
The policy document.
|
void |
setIsDefaultVersion(Boolean isDefaultVersion)
Specifies whether the policy version is set as the policy's default
version.
|
void |
setVersionId(String versionId)
The identifier for the policy version.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PolicyVersion |
withCreateDate(Date createDate)
The date and time, in ISO
8601 date-time format, when the policy version was created.
|
PolicyVersion |
withDocument(String document)
The policy document.
|
PolicyVersion |
withIsDefaultVersion(Boolean isDefaultVersion)
Specifies whether the policy version is set as the policy's default
version.
|
PolicyVersion |
withVersionId(String versionId)
The identifier for the policy version.
|
public String getDocument()
The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.
public void setDocument(String document)
The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
document
- The policy document. The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.
public PolicyVersion withDocument(String document)
The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
document
- The policy document. The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.
public String getVersionId()
Policy version identifiers
always begin with v
(always lowercase). When a policy is
created, the first policy version is v1
.
Constraints:
Pattern: v[1-9][0-9]*(\.[A-Za-z0-9-]*)?
Policy version identifiers
always begin with v
(always lowercase). When a policy is
created, the first policy version is v1
.
public void setVersionId(String versionId)
Policy version identifiers
always begin with v
(always lowercase). When a policy is
created, the first policy version is v1
.
Constraints:
Pattern: v[1-9][0-9]*(\.[A-Za-z0-9-]*)?
versionId
- The identifier for the policy version. Policy version identifiers
always begin with v
(always lowercase). When a policy is
created, the first policy version is v1
.
public PolicyVersion withVersionId(String versionId)
Policy version identifiers
always begin with v
(always lowercase). When a policy is
created, the first policy version is v1
.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Pattern: v[1-9][0-9]*(\.[A-Za-z0-9-]*)?
versionId
- The identifier for the policy version. Policy version identifiers
always begin with v
(always lowercase). When a policy is
created, the first policy version is v1
.
public Boolean isDefaultVersion()
public void setIsDefaultVersion(Boolean isDefaultVersion)
isDefaultVersion
- Specifies whether the policy version is set as the policy's default
version.public PolicyVersion withIsDefaultVersion(Boolean isDefaultVersion)
Returns a reference to this object so that method calls can be chained together.
isDefaultVersion
- Specifies whether the policy version is set as the policy's default
version.public Boolean getIsDefaultVersion()
public Date getCreateDate()
public void setCreateDate(Date createDate)
createDate
- The date and time, in ISO
8601 date-time format, when the policy version was created.public PolicyVersion withCreateDate(Date createDate)
Returns a reference to this object so that method calls can be chained together.
createDate
- The date and time, in ISO
8601 date-time format, when the policy version was created.public String toString()
toString
in class Object
Object.toString()
public PolicyVersion clone()
Copyright © 2015. All rights reserved.