@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Policy extends Object implements Serializable, Cloneable
Contains information about a managed policy.
This data type is used as a response element in the CreatePolicy, GetPolicy, and ListPolicies actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
Constructor and Description |
---|
Policy() |
Modifier and Type | Method and Description |
---|---|
Policy |
clone() |
boolean |
equals(Object obj) |
String |
getArn() |
Integer |
getAttachmentCount()
The number of entities (users, groups, and roles) that the policy is attached to.
|
Date |
getCreateDate()
The date and time, in ISO 8601 date-time format, when the policy was
created.
|
String |
getDefaultVersionId()
The identifier for the version of the policy that is set as the default version.
|
String |
getDescription()
A friendly description of the policy.
|
Boolean |
getIsAttachable()
Specifies whether the policy can be attached to an IAM user, group, or role.
|
String |
getPath()
The path to the policy.
|
String |
getPolicyId()
The stable and unique string identifying the policy.
|
String |
getPolicyName()
The friendly name (not ARN) identifying the policy.
|
Date |
getUpdateDate()
The date and time, in ISO 8601 date-time format, when the policy was
last updated.
|
int |
hashCode() |
Boolean |
isAttachable()
Specifies whether the policy can be attached to an IAM user, group, or role.
|
void |
setArn(String arn) |
void |
setAttachmentCount(Integer attachmentCount)
The number of entities (users, groups, and roles) that the policy is attached to.
|
void |
setCreateDate(Date createDate)
The date and time, in ISO 8601 date-time format, when the policy was
created.
|
void |
setDefaultVersionId(String defaultVersionId)
The identifier for the version of the policy that is set as the default version.
|
void |
setDescription(String description)
A friendly description of the policy.
|
void |
setIsAttachable(Boolean isAttachable)
Specifies whether the policy can be attached to an IAM user, group, or role.
|
void |
setPath(String path)
The path to the policy.
|
void |
setPolicyId(String policyId)
The stable and unique string identifying the policy.
|
void |
setPolicyName(String policyName)
The friendly name (not ARN) identifying the policy.
|
void |
setUpdateDate(Date updateDate)
The date and time, in ISO 8601 date-time format, when the policy was
last updated.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
Policy |
withArn(String arn) |
Policy |
withAttachmentCount(Integer attachmentCount)
The number of entities (users, groups, and roles) that the policy is attached to.
|
Policy |
withCreateDate(Date createDate)
The date and time, in ISO 8601 date-time format, when the policy was
created.
|
Policy |
withDefaultVersionId(String defaultVersionId)
The identifier for the version of the policy that is set as the default version.
|
Policy |
withDescription(String description)
A friendly description of the policy.
|
Policy |
withIsAttachable(Boolean isAttachable)
Specifies whether the policy can be attached to an IAM user, group, or role.
|
Policy |
withPath(String path)
The path to the policy.
|
Policy |
withPolicyId(String policyId)
The stable and unique string identifying the policy.
|
Policy |
withPolicyName(String policyName)
The friendly name (not ARN) identifying the policy.
|
Policy |
withUpdateDate(Date updateDate)
The date and time, in ISO 8601 date-time format, when the policy was
last updated.
|
public void setPolicyName(String policyName)
The friendly name (not ARN) identifying the policy.
policyName
- The friendly name (not ARN) identifying the policy.public String getPolicyName()
The friendly name (not ARN) identifying the policy.
public Policy withPolicyName(String policyName)
The friendly name (not ARN) identifying the policy.
policyName
- The friendly name (not ARN) identifying the policy.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.
policyId
- The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
public 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 Policy withPolicyId(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(String arn)
arn
- public String getArn()
public Policy withArn(String arn)
arn
- public void setPath(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 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 Policy withPath(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(String defaultVersionId)
The identifier for the version of the policy that is set as the default version.
defaultVersionId
- The identifier for the version of the policy that is set as the default version.public String getDefaultVersionId()
The identifier for the version of the policy that is set as the default version.
public Policy withDefaultVersionId(String defaultVersionId)
The identifier for the version of the policy that is set as the default version.
defaultVersionId
- The identifier for the version of the policy that is set as the default version.public void setAttachmentCount(Integer attachmentCount)
The number of entities (users, groups, and roles) that the policy is attached to.
attachmentCount
- The number of entities (users, groups, and roles) that the policy is attached to.public Integer getAttachmentCount()
The number of entities (users, groups, and roles) that the policy is attached to.
public Policy withAttachmentCount(Integer attachmentCount)
The number of entities (users, groups, and roles) that the policy is attached to.
attachmentCount
- The number of entities (users, groups, and roles) that the policy is attached to.public void setIsAttachable(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 Boolean getIsAttachable()
Specifies whether the policy can be attached to an IAM user, group, or role.
public Policy withIsAttachable(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 Boolean isAttachable()
Specifies whether the policy can be attached to an IAM user, group, or role.
public void setDescription(String description)
A friendly description of the policy.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
description
- A friendly description of the policy.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
public String getDescription()
A friendly description of the policy.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
public Policy withDescription(String description)
A friendly description of the policy.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
description
- A friendly description of the policy.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
public void setCreateDate(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 Date getCreateDate()
The date and time, in ISO 8601 date-time format, when the policy was created.
public Policy withCreateDate(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(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 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 Policy 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.
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 String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.