Class PolicyVersion
- All Implemented Interfaces:
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The date and time, in ISO 8601 date-time format, when the policy version was created.The policy document.Specifies whether the policy version is set as the policy's default version.The identifier for the policy version.int
hashCode()
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.toString()
Returns a string representation of this object; useful for testing and debugging.withCreateDate
(Date createDate) The date and time, in ISO 8601 date-time format, when the policy version was created.withDocument
(String document) The policy document.withIsDefaultVersion
(Boolean isDefaultVersion) Specifies whether the policy version is set as the policy's default version.withVersionId
(String versionId) The identifier for the policy version.
-
Constructor Details
-
PolicyVersion
public PolicyVersion()
-
-
Method Details
-
setDocument
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
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
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
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
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
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
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
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
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
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
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
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
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
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-