@Generated(value="software.amazon.awssdk:codegen") public class Policy extends Object implements ToCopyableBuilder<Policy.Builder,Policy>
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.
Modifier and Type | Class and Description |
---|---|
static interface |
Policy.Builder |
Modifier and Type | Method and Description |
---|---|
String |
arn()
Returns the value of the Arn property for this object.
|
Integer |
attachmentCount()
The number of entities (users, groups, and roles) that the policy is attached to.
|
static Policy.Builder |
builder() |
Instant |
createDate()
The date and time, in ISO 8601 date-time format, when the policy was
created.
|
String |
defaultVersionId()
The identifier for the version of the policy that is set as the default version.
|
String |
description()
A friendly description of the policy.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
Boolean |
isAttachable()
Specifies whether the policy can be attached to an IAM user, group, or role.
|
String |
path()
The path to the policy.
|
String |
policyId()
The stable and unique string identifying the policy.
|
String |
policyName()
The friendly name (not ARN) identifying the policy.
|
static Class<? extends Policy.Builder> |
serializableBuilderClass() |
Policy.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
Instant |
updateDate()
The date and time, in ISO 8601 date-time format, when the policy was
last updated.
|
copy
public String policyName()
The friendly name (not ARN) identifying the policy.
public String policyId()
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 String arn()
public String path()
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 String defaultVersionId()
The identifier for the version of the policy that is set as the default version.
public Integer attachmentCount()
The number of entities (users, groups, and roles) that the policy is attached to.
public Boolean isAttachable()
Specifies whether the policy can be attached to an IAM user, group, or role.
public 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.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
public Instant createDate()
The date and time, in ISO 8601 date-time format, when the policy was created.
public Instant 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.
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.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<Policy.Builder,Policy>
public static Policy.Builder builder()
public static Class<? extends Policy.Builder> serializableBuilderClass()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.