public class PolicyVersion
extends java.lang.Object
implements java.io.Serializable, java.lang.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.
Modifier and Type | Field and Description |
---|---|
private java.util.Date |
createDate
The date and time, in ISO 8601
date-time format, when the policy version was created.
|
private java.lang.String |
document
The policy document.
|
private java.lang.Boolean |
isDefaultVersion
Specifies whether the policy version is set as the policy's default
version.
|
private java.lang.String |
versionId
The identifier for the policy version.
|
Constructor and Description |
---|
PolicyVersion() |
Modifier and Type | Method and Description |
---|---|
PolicyVersion |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.Date |
getCreateDate()
The date and time, in ISO 8601
date-time format, when the policy version was created.
|
java.lang.String |
getDocument()
The policy document.
|
java.lang.Boolean |
getIsDefaultVersion()
Specifies whether the policy version is set as the policy's default
version.
|
java.lang.String |
getVersionId()
The identifier for the policy version.
|
int |
hashCode() |
java.lang.Boolean |
isDefaultVersion()
Specifies whether the policy version is set as the policy's default
version.
|
void |
setCreateDate(java.util.Date createDate)
The date and time, in ISO 8601
date-time format, when the policy version was created.
|
void |
setDocument(java.lang.String document)
The policy document.
|
void |
setIsDefaultVersion(java.lang.Boolean isDefaultVersion)
Specifies whether the policy version is set as the policy's default
version.
|
void |
setVersionId(java.lang.String versionId)
The identifier for the policy version.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PolicyVersion |
withCreateDate(java.util.Date createDate)
The date and time, in ISO 8601
date-time format, when the policy version was created.
|
PolicyVersion |
withDocument(java.lang.String document)
The policy document.
|
PolicyVersion |
withIsDefaultVersion(java.lang.Boolean isDefaultVersion)
Specifies whether the policy version is set as the policy's default
version.
|
PolicyVersion |
withVersionId(java.lang.String versionId)
The identifier for the policy version.
|
private java.lang.String 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.
private java.lang.String 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
.
private java.lang.Boolean isDefaultVersion
Specifies whether the policy version is set as the policy's default version.
private java.util.Date createDate
The date and time, in ISO 8601 date-time format, when the policy version was created.
public void setDocument(java.lang.String 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.
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 java.lang.String getDocument()
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.
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(java.lang.String 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.
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 void setVersionId(java.lang.String 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
.
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 java.lang.String getVersionId()
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
.
Policy version identifiers always begin with v
(always lowercase). When a policy is created, the first policy
version is v1
.
public PolicyVersion withVersionId(java.lang.String 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
.
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 void setIsDefaultVersion(java.lang.Boolean isDefaultVersion)
Specifies whether the policy version is set as the policy's default version.
isDefaultVersion
- Specifies whether the policy version is set as the policy's
default version.public java.lang.Boolean getIsDefaultVersion()
Specifies whether the policy version is set as the policy's default version.
public PolicyVersion withIsDefaultVersion(java.lang.Boolean isDefaultVersion)
Specifies whether the policy version is set as the policy's default version.
isDefaultVersion
- Specifies whether the policy version is set as the policy's
default version.public java.lang.Boolean isDefaultVersion()
Specifies whether the policy version is set as the policy's default version.
public void setCreateDate(java.util.Date createDate)
The date and time, in ISO 8601 date-time format, when the policy version was created.
createDate
- The date and time, in ISO
8601 date-time format, when the policy version was created.public java.util.Date getCreateDate()
The date and time, in ISO 8601 date-time format, when the policy version was created.
public PolicyVersion withCreateDate(java.util.Date createDate)
The date and time, in ISO 8601 date-time format, when the policy version was created.
createDate
- The date and time, in ISO
8601 date-time format, when the policy version was created.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public PolicyVersion clone()
clone
in class java.lang.Object