Class PolicyVersion
- java.lang.Object
-
- com.amazonaws.services.identitymanagement.model.PolicyVersion
-
- All Implemented Interfaces:
Serializable,Cloneable
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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PolicyVersion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PolicyVersionclone()booleanequals(Object obj)DategetCreateDate()The date and time, in ISO 8601 date-time format, when the policy version was created.StringgetDocument()The policy document.BooleangetIsDefaultVersion()Specifies whether the policy version is set as the policy's default version.StringgetVersionId()The identifier for the policy version.inthashCode()BooleanisDefaultVersion()Specifies whether the policy version is set as the policy's default version.voidsetCreateDate(Date createDate)The date and time, in ISO 8601 date-time format, when the policy version was created.voidsetDocument(String document)The policy document.voidsetIsDefaultVersion(Boolean isDefaultVersion)Specifies whether the policy version is set as the policy's default version.voidsetVersionId(String versionId)The identifier for the policy version.StringtoString()Returns a string representation of this object; useful for testing and debugging.PolicyVersionwithCreateDate(Date createDate)The date and time, in ISO 8601 date-time format, when the policy version was created.PolicyVersionwithDocument(String document)The policy document.PolicyVersionwithIsDefaultVersion(Boolean isDefaultVersion)Specifies whether the policy version is set as the policy's default version.PolicyVersionwithVersionId(String versionId)The identifier for the policy version.
-
-
-
Method Detail
-
setDocument
public void setDocument(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.
- Parameters:
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.
-
getDocument
public 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.
- Returns:
- 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.
-
withDocument
public PolicyVersion withDocument(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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setVersionId
public void setVersionId(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 isv1.- Parameters:
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 isv1.
-
getVersionId
public 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 isv1.- Returns:
- The identifier for the policy version.
Policy version identifiers always begin with
v(always lowercase). When a policy is created, the first policy version isv1.
-
withVersionId
public PolicyVersion withVersionId(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 isv1.- Parameters:
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 isv1.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIsDefaultVersion
public void setIsDefaultVersion(Boolean isDefaultVersion)
Specifies whether the policy version is set as the policy's default version.
- Parameters:
isDefaultVersion- Specifies whether the policy version is set as the policy's default version.
-
getIsDefaultVersion
public Boolean getIsDefaultVersion()
Specifies whether the policy version is set as the policy's default version.
- Returns:
- Specifies whether the policy version is set as the policy's default version.
-
withIsDefaultVersion
public PolicyVersion withIsDefaultVersion(Boolean isDefaultVersion)
Specifies whether the policy version is set as the policy's default version.
- Parameters:
isDefaultVersion- Specifies whether the policy version is set as the policy's default version.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isDefaultVersion
public Boolean isDefaultVersion()
Specifies whether the policy version is set as the policy's default version.
- Returns:
- Specifies whether the policy version is set as the policy's default version.
-
setCreateDate
public void setCreateDate(Date createDate)
The date and time, in ISO 8601 date-time format, when the policy version was created.
- Parameters:
createDate- The date and time, in ISO 8601 date-time format, when the policy version was created.
-
getCreateDate
public Date getCreateDate()
The date and time, in ISO 8601 date-time format, when the policy version was created.
- Returns:
- The date and time, in ISO 8601 date-time format, when the policy version was created.
-
withCreateDate
public PolicyVersion withCreateDate(Date createDate)
The date and time, in ISO 8601 date-time format, when the policy version was created.
- Parameters:
createDate- The date and time, in ISO 8601 date-time format, when the policy version was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public PolicyVersion clone()
-
-