Class ManagedPolicyDetail
- java.lang.Object
-
- com.amazonaws.services.identitymanagement.model.ManagedPolicyDetail
-
- All Implemented Interfaces:
Serializable,Cloneable
public class ManagedPolicyDetail extends Object implements Serializable, 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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ManagedPolicyDetail()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagedPolicyDetailclone()booleanequals(Object obj)StringgetArn()IntegergetAttachmentCount()The number of principal entities (users, groups, and roles) that the policy is attached to.DategetCreateDate()The date and time, in ISO 8601 date-time format, when the policy was created.StringgetDefaultVersionId()The identifier for the version of the policy that is set as the default (operative) version.StringgetDescription()A friendly description of the policy.BooleangetIsAttachable()Specifies whether the policy can be attached to an IAM user, group, or role.StringgetPath()The path to the policy.StringgetPolicyId()The stable and unique string identifying the policy.StringgetPolicyName()The friendly name (not ARN) identifying the policy.List<PolicyVersion>getPolicyVersionList()A list containing information about the versions of the policy.DategetUpdateDate()The date and time, in ISO 8601 date-time format, when the policy was last updated.inthashCode()BooleanisAttachable()Specifies whether the policy can be attached to an IAM user, group, or role.voidsetArn(String arn)voidsetAttachmentCount(Integer attachmentCount)The number of principal entities (users, groups, and roles) that the policy is attached to.voidsetCreateDate(Date createDate)The date and time, in ISO 8601 date-time format, when the policy was created.voidsetDefaultVersionId(String defaultVersionId)The identifier for the version of the policy that is set as the default (operative) version.voidsetDescription(String description)A friendly description of the policy.voidsetIsAttachable(Boolean isAttachable)Specifies whether the policy can be attached to an IAM user, group, or role.voidsetPath(String path)The path to the policy.voidsetPolicyId(String policyId)The stable and unique string identifying the policy.voidsetPolicyName(String policyName)The friendly name (not ARN) identifying the policy.voidsetPolicyVersionList(Collection<PolicyVersion> policyVersionList)A list containing information about the versions of the policy.voidsetUpdateDate(Date updateDate)The date and time, in ISO 8601 date-time format, when the policy was last updated.StringtoString()Returns a string representation of this object; useful for testing and debugging.ManagedPolicyDetailwithArn(String arn)ManagedPolicyDetailwithAttachmentCount(Integer attachmentCount)The number of principal entities (users, groups, and roles) that the policy is attached to.ManagedPolicyDetailwithCreateDate(Date createDate)The date and time, in ISO 8601 date-time format, when the policy was created.ManagedPolicyDetailwithDefaultVersionId(String defaultVersionId)The identifier for the version of the policy that is set as the default (operative) version.ManagedPolicyDetailwithDescription(String description)A friendly description of the policy.ManagedPolicyDetailwithIsAttachable(Boolean isAttachable)Specifies whether the policy can be attached to an IAM user, group, or role.ManagedPolicyDetailwithPath(String path)The path to the policy.ManagedPolicyDetailwithPolicyId(String policyId)The stable and unique string identifying the policy.ManagedPolicyDetailwithPolicyName(String policyName)The friendly name (not ARN) identifying the policy.ManagedPolicyDetailwithPolicyVersionList(PolicyVersion... policyVersionList)A list containing information about the versions of the policy.ManagedPolicyDetailwithPolicyVersionList(Collection<PolicyVersion> policyVersionList)A list containing information about the versions of the policy.ManagedPolicyDetailwithUpdateDate(Date updateDate)The date and time, in ISO 8601 date-time format, when the policy was last updated.
-
-
-
Method Detail
-
setPolicyName
public void setPolicyName(String policyName)
The friendly name (not ARN) identifying the policy.
- Parameters:
policyName- The friendly name (not ARN) identifying the policy.
-
getPolicyName
public String getPolicyName()
The friendly name (not ARN) identifying the policy.
- Returns:
- The friendly name (not ARN) identifying the policy.
-
withPolicyName
public ManagedPolicyDetail withPolicyName(String policyName)
The friendly name (not ARN) identifying the policy.
- Parameters:
policyName- The friendly name (not ARN) identifying the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPolicyId
public void setPolicyId(String policyId)
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
- Parameters:
policyId- The stable and unique string identifying the policy.For more information about IDs, see IAM Identifiers in the Using IAM guide.
-
getPolicyId
public String getPolicyId()
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
- Returns:
- The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
-
withPolicyId
public ManagedPolicyDetail withPolicyId(String policyId)
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
- Parameters:
policyId- The stable and unique string identifying the policy.For more information about IDs, see IAM Identifiers in the Using IAM guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setArn
public void setArn(String arn)
- Parameters:
arn-
-
getArn
public String getArn()
- Returns:
-
withArn
public ManagedPolicyDetail withArn(String arn)
- Parameters:
arn-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPath
public void setPath(String path)
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
- Parameters:
path- The path to the policy.For more information about paths, see IAM Identifiers in the Using IAM guide.
-
getPath
public String getPath()
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
- Returns:
- The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
-
withPath
public ManagedPolicyDetail withPath(String path)
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
- Parameters:
path- The path to the policy.For more information about paths, see IAM Identifiers in the Using IAM guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDefaultVersionId
public void setDefaultVersionId(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.
- Parameters:
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.
-
getDefaultVersionId
public 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.
- Returns:
- 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.
-
withDefaultVersionId
public ManagedPolicyDetail withDefaultVersionId(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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAttachmentCount
public void setAttachmentCount(Integer attachmentCount)
The number of principal entities (users, groups, and roles) that the policy is attached to.
- Parameters:
attachmentCount- The number of principal entities (users, groups, and roles) that the policy is attached to.
-
getAttachmentCount
public Integer getAttachmentCount()
The number of principal entities (users, groups, and roles) that the policy is attached to.
- Returns:
- The number of principal entities (users, groups, and roles) that the policy is attached to.
-
withAttachmentCount
public ManagedPolicyDetail withAttachmentCount(Integer attachmentCount)
The number of principal entities (users, groups, and roles) that the policy is attached to.
- Parameters:
attachmentCount- The number of principal entities (users, groups, and roles) that the policy is attached to.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIsAttachable
public void setIsAttachable(Boolean isAttachable)
Specifies whether the policy can be attached to an IAM user, group, or role.
- Parameters:
isAttachable- Specifies whether the policy can be attached to an IAM user, group, or role.
-
getIsAttachable
public Boolean getIsAttachable()
Specifies whether the policy can be attached to an IAM user, group, or role.
- Returns:
- Specifies whether the policy can be attached to an IAM user, group, or role.
-
withIsAttachable
public ManagedPolicyDetail withIsAttachable(Boolean isAttachable)
Specifies whether the policy can be attached to an IAM user, group, or role.
- Parameters:
isAttachable- Specifies whether the policy can be attached to an IAM user, group, or role.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isAttachable
public Boolean isAttachable()
Specifies whether the policy can be attached to an IAM user, group, or role.
- Returns:
- Specifies whether the policy can be attached to an IAM user, group, or role.
-
setDescription
public void setDescription(String description)
A friendly description of the policy.
- Parameters:
description- A friendly description of the policy.
-
getDescription
public String getDescription()
A friendly description of the policy.
- Returns:
- A friendly description of the policy.
-
withDescription
public ManagedPolicyDetail withDescription(String description)
A friendly description of the policy.
- Parameters:
description- A friendly description of the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCreateDate
public void setCreateDate(Date createDate)
The date and time, in ISO 8601 date-time format, when the policy was created.
- Parameters:
createDate- The date and time, in ISO 8601 date-time format, when the policy was created.
-
getCreateDate
public Date getCreateDate()
The date and time, in ISO 8601 date-time format, when the policy was created.
- Returns:
- The date and time, in ISO 8601 date-time format, when the policy was created.
-
withCreateDate
public ManagedPolicyDetail withCreateDate(Date createDate)
The date and time, in ISO 8601 date-time format, when the policy was created.
- Parameters:
createDate- The date and time, in ISO 8601 date-time format, when the policy was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUpdateDate
public void setUpdateDate(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.
- Parameters:
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.
-
getUpdateDate
public 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.
- Returns:
- 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.
-
withUpdateDate
public ManagedPolicyDetail withUpdateDate(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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getPolicyVersionList
public List<PolicyVersion> getPolicyVersionList()
A list containing information about the versions of the policy.
- Returns:
- A list containing information about the versions of the policy.
-
setPolicyVersionList
public void setPolicyVersionList(Collection<PolicyVersion> policyVersionList)
A list containing information about the versions of the policy.
- Parameters:
policyVersionList- A list containing information about the versions of the policy.
-
withPolicyVersionList
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)orwithPolicyVersionList(java.util.Collection)if you want to override the existing values.- Parameters:
policyVersionList- A list containing information about the versions of the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withPolicyVersionList
public ManagedPolicyDetail withPolicyVersionList(Collection<PolicyVersion> policyVersionList)
A list containing information about the versions of the policy.
- Parameters:
policyVersionList- A list containing information about the versions of the policy.- 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 ManagedPolicyDetail clone()
-
-