Skip to content

IAM  >  Structures  >  Policy

Policy

Structure Class

Policy dataclass

Bases: _SerdeShape

Contains information about a managed policy.

This data type is used as a response element in the CreatePolicy, GetPolicy, and ListPolicies operations.

For more information about managed policies, refer to Managed policies and inline policies in the IAM User Guide.

Attributes

arn class-attribute instance-attribute
arn: str | None = ...

The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web Services resources.

For more information about ARNs, go to Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

attachment_count class-attribute instance-attribute
attachment_count: int | None = ...

The number of entities (users, groups, and roles) that the policy is attached to.

create_date class-attribute instance-attribute
create_date: datetime | None = ...

The date and time, in ISO 8601 date-time format, when the policy was created.

default_version_id class-attribute instance-attribute
default_version_id: str | None = ...

The identifier for the version of the policy that is set as the default version.

description class-attribute instance-attribute
description: str | None = ...

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.

is_attachable class-attribute instance-attribute
is_attachable: bool = ...

Specifies whether the policy can be attached to an IAM user, group, or role.

path class-attribute instance-attribute
path: str | None = ...

The path to the policy.

For more information about paths, see IAM identifiers in the IAM User Guide.

permissions_boundary_usage_count class-attribute instance-attribute
permissions_boundary_usage_count: int | None = ...

The number of entities (users and roles) for which the policy is used to set the permissions boundary.

For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.

policy_id class-attribute instance-attribute
policy_id: str | None = ...

The stable and unique string identifying the policy.

For more information about IDs, see IAM identifiers in the IAM User Guide.

policy_name class-attribute instance-attribute
policy_name: str | None = ...

The friendly name (not ARN) identifying the policy.

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

A list of tags that are attached to the instance profile. For more information about tagging, see Tagging IAM resources in the IAM User Guide.

update_date class-attribute instance-attribute
update_date: datetime | None = ...

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.