public class ManagedPolicyDetail
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Contains information about a managed policy, including the policy's ARN, versions, and the number of principal entities (users, groups, and roles) that the policy is attached to.
This data type is used as a response element in the GetAccountAuthorizationDetails action.
For more information about managed policies, see Managed Policies and Inline Policies in the Using IAM guide.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
arn |
private java.lang.Integer |
attachmentCount
The number of principal entities (users, groups, and roles) that the
policy is attached to.
|
private java.util.Date |
createDate
The date and time, in ISO 8601
date-time format, when the policy was created.
|
private java.lang.String |
defaultVersionId
The identifier for the version of the policy that is set as the default
(operative) version.
|
private java.lang.String |
description
A friendly description of the policy.
|
private java.lang.Boolean |
isAttachable
Specifies whether the policy can be attached to an IAM user, group, or
role.
|
private java.lang.String |
path
The path to the policy.
|
private java.lang.String |
policyId
The stable and unique string identifying the policy.
|
private java.lang.String |
policyName
The friendly name (not ARN) identifying the policy.
|
private SdkInternalList<PolicyVersion> |
policyVersionList
A list containing information about the versions of the policy.
|
private java.util.Date |
updateDate
The date and time, in ISO 8601
date-time format, when the policy was last updated.
|
Constructor and Description |
---|
ManagedPolicyDetail() |
Modifier and Type | Method and Description |
---|---|
ManagedPolicyDetail |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getArn() |
java.lang.Integer |
getAttachmentCount()
The number of principal entities (users, groups, and roles) that the
policy is attached to.
|
java.util.Date |
getCreateDate()
The date and time, in ISO 8601
date-time format, when the policy was created.
|
java.lang.String |
getDefaultVersionId()
The identifier for the version of the policy that is set as the default
(operative) version.
|
java.lang.String |
getDescription()
A friendly description of the policy.
|
java.lang.Boolean |
getIsAttachable()
Specifies whether the policy can be attached to an IAM user, group, or
role.
|
java.lang.String |
getPath()
The path to the policy.
|
java.lang.String |
getPolicyId()
The stable and unique string identifying the policy.
|
java.lang.String |
getPolicyName()
The friendly name (not ARN) identifying the policy.
|
java.util.List<PolicyVersion> |
getPolicyVersionList()
A list containing information about the versions of the policy.
|
java.util.Date |
getUpdateDate()
The date and time, in ISO 8601
date-time format, when the policy was last updated.
|
int |
hashCode() |
java.lang.Boolean |
isAttachable()
Specifies whether the policy can be attached to an IAM user, group, or
role.
|
void |
setArn(java.lang.String arn) |
void |
setAttachmentCount(java.lang.Integer attachmentCount)
The number of principal entities (users, groups, and roles) that the
policy is attached to.
|
void |
setCreateDate(java.util.Date createDate)
The date and time, in ISO 8601
date-time format, when the policy was created.
|
void |
setDefaultVersionId(java.lang.String defaultVersionId)
The identifier for the version of the policy that is set as the default
(operative) version.
|
void |
setDescription(java.lang.String description)
A friendly description of the policy.
|
void |
setIsAttachable(java.lang.Boolean isAttachable)
Specifies whether the policy can be attached to an IAM user, group, or
role.
|
void |
setPath(java.lang.String path)
The path to the policy.
|
void |
setPolicyId(java.lang.String policyId)
The stable and unique string identifying the policy.
|
void |
setPolicyName(java.lang.String policyName)
The friendly name (not ARN) identifying the policy.
|
void |
setPolicyVersionList(java.util.Collection<PolicyVersion> policyVersionList)
A list containing information about the versions of the policy.
|
void |
setUpdateDate(java.util.Date updateDate)
The date and time, in ISO 8601
date-time format, when the policy was last updated.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ManagedPolicyDetail |
withArn(java.lang.String arn) |
ManagedPolicyDetail |
withAttachmentCount(java.lang.Integer attachmentCount)
The number of principal entities (users, groups, and roles) that the
policy is attached to.
|
ManagedPolicyDetail |
withCreateDate(java.util.Date createDate)
The date and time, in ISO 8601
date-time format, when the policy was created.
|
ManagedPolicyDetail |
withDefaultVersionId(java.lang.String defaultVersionId)
The identifier for the version of the policy that is set as the default
(operative) version.
|
ManagedPolicyDetail |
withDescription(java.lang.String description)
A friendly description of the policy.
|
ManagedPolicyDetail |
withIsAttachable(java.lang.Boolean isAttachable)
Specifies whether the policy can be attached to an IAM user, group, or
role.
|
ManagedPolicyDetail |
withPath(java.lang.String path)
The path to the policy.
|
ManagedPolicyDetail |
withPolicyId(java.lang.String policyId)
The stable and unique string identifying the policy.
|
ManagedPolicyDetail |
withPolicyName(java.lang.String policyName)
The friendly name (not ARN) identifying the policy.
|
ManagedPolicyDetail |
withPolicyVersionList(java.util.Collection<PolicyVersion> policyVersionList)
A list containing information about the versions of the policy.
|
ManagedPolicyDetail |
withPolicyVersionList(PolicyVersion... policyVersionList)
A list containing information about the versions of the policy.
|
ManagedPolicyDetail |
withUpdateDate(java.util.Date updateDate)
The date and time, in ISO 8601
date-time format, when the policy was last updated.
|
private java.lang.String policyName
The friendly name (not ARN) identifying the policy.
private java.lang.String policyId
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
private java.lang.String arn
private java.lang.String path
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
private java.lang.String defaultVersionId
The identifier for the version of the policy that is set as the default (operative) version.
For more information about policy versions, see Versioning for Managed Policies in the Using IAM guide.
private java.lang.Integer attachmentCount
The number of principal entities (users, groups, and roles) that the policy is attached to.
private java.lang.Boolean isAttachable
Specifies whether the policy can be attached to an IAM user, group, or role.
private java.lang.String description
A friendly description of the policy.
private java.util.Date createDate
The date and time, in ISO 8601 date-time format, when the policy was created.
private java.util.Date updateDate
The date and time, in ISO 8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
private SdkInternalList<PolicyVersion> policyVersionList
A list containing information about the versions of the policy.
public void setPolicyName(java.lang.String policyName)
The friendly name (not ARN) identifying the policy.
policyName
- The friendly name (not ARN) identifying the policy.public java.lang.String getPolicyName()
The friendly name (not ARN) identifying the policy.
public ManagedPolicyDetail withPolicyName(java.lang.String policyName)
The friendly name (not ARN) identifying the policy.
policyName
- The friendly name (not ARN) identifying the policy.public void setPolicyId(java.lang.String policyId)
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
policyId
- The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
public java.lang.String getPolicyId()
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
public ManagedPolicyDetail withPolicyId(java.lang.String policyId)
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
policyId
- The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
public void setArn(java.lang.String arn)
arn
- public java.lang.String getArn()
public ManagedPolicyDetail withArn(java.lang.String arn)
arn
- public void setPath(java.lang.String path)
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
path
- The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
public java.lang.String getPath()
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
For more information about paths, see IAM Identifiers in the Using IAM guide.
public ManagedPolicyDetail withPath(java.lang.String path)
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
path
- The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
public void setDefaultVersionId(java.lang.String defaultVersionId)
The identifier for the version of the policy that is set as the default (operative) version.
For more information about policy versions, see Versioning for Managed Policies in the Using IAM guide.
defaultVersionId
- The identifier for the version of the policy that is set as the
default (operative) version.
For more information about policy versions, see Versioning for Managed Policies in the Using IAM guide.
public java.lang.String getDefaultVersionId()
The identifier for the version of the policy that is set as the default (operative) version.
For more information about policy versions, see Versioning for Managed Policies in the Using IAM guide.
For more information about policy versions, see Versioning for Managed Policies in the Using IAM guide.
public ManagedPolicyDetail withDefaultVersionId(java.lang.String defaultVersionId)
The identifier for the version of the policy that is set as the default (operative) version.
For more information about policy versions, see Versioning for Managed Policies in the Using IAM guide.
defaultVersionId
- The identifier for the version of the policy that is set as the
default (operative) version.
For more information about policy versions, see Versioning for Managed Policies in the Using IAM guide.
public void setAttachmentCount(java.lang.Integer attachmentCount)
The number of principal entities (users, groups, and roles) that the policy is attached to.
attachmentCount
- The number of principal entities (users, groups, and roles) that
the policy is attached to.public java.lang.Integer getAttachmentCount()
The number of principal entities (users, groups, and roles) that the policy is attached to.
public ManagedPolicyDetail withAttachmentCount(java.lang.Integer attachmentCount)
The number of principal entities (users, groups, and roles) that the policy is attached to.
attachmentCount
- The number of principal entities (users, groups, and roles) that
the policy is attached to.public void setIsAttachable(java.lang.Boolean isAttachable)
Specifies whether the policy can be attached to an IAM user, group, or role.
isAttachable
- Specifies whether the policy can be attached to an IAM user,
group, or role.public java.lang.Boolean getIsAttachable()
Specifies whether the policy can be attached to an IAM user, group, or role.
public ManagedPolicyDetail withIsAttachable(java.lang.Boolean isAttachable)
Specifies whether the policy can be attached to an IAM user, group, or role.
isAttachable
- Specifies whether the policy can be attached to an IAM user,
group, or role.public java.lang.Boolean isAttachable()
Specifies whether the policy can be attached to an IAM user, group, or role.
public void setDescription(java.lang.String description)
A friendly description of the policy.
description
- A friendly description of the policy.public java.lang.String getDescription()
A friendly description of the policy.
public ManagedPolicyDetail withDescription(java.lang.String description)
A friendly description of the policy.
description
- A friendly description of the policy.public void setCreateDate(java.util.Date createDate)
The date and time, in ISO 8601 date-time format, when the policy was created.
createDate
- The date and time, in ISO
8601 date-time format, when the policy was created.public java.util.Date getCreateDate()
The date and time, in ISO 8601 date-time format, when the policy was created.
public ManagedPolicyDetail withCreateDate(java.util.Date createDate)
The date and time, in ISO 8601 date-time format, when the policy was created.
createDate
- The date and time, in ISO
8601 date-time format, when the policy was created.public void setUpdateDate(java.util.Date updateDate)
The date and time, in ISO 8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
updateDate
- The date and time, in ISO
8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
public java.util.Date getUpdateDate()
The date and time, in ISO 8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
public ManagedPolicyDetail withUpdateDate(java.util.Date updateDate)
The date and time, in ISO 8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
updateDate
- The date and time, in ISO
8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
public java.util.List<PolicyVersion> getPolicyVersionList()
A list containing information about the versions of the policy.
public void setPolicyVersionList(java.util.Collection<PolicyVersion> policyVersionList)
A list containing information about the versions of the policy.
policyVersionList
- A list containing information about the versions of the policy.public ManagedPolicyDetail withPolicyVersionList(PolicyVersion... policyVersionList)
A list containing information about the versions of the policy.
NOTE: This method appends the values to the existing list (if
any). Use setPolicyVersionList(java.util.Collection)
or
withPolicyVersionList(java.util.Collection)
if you want to
override the existing values.
policyVersionList
- A list containing information about the versions of the policy.public ManagedPolicyDetail withPolicyVersionList(java.util.Collection<PolicyVersion> policyVersionList)
A list containing information about the versions of the policy.
policyVersionList
- A list containing information about the versions of the policy.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 ManagedPolicyDetail clone()
clone
in class java.lang.Object