---
type: resource-type
title: AccountPolicy
description: aws resource type AWS::Logs::AccountPolicy
name: AccountPolicy
lexicon: aws
resource_type: AWS::Logs::AccountPolicy
---
`AWS::Logs::AccountPolicy`, a resource type of the aws lexicon.

## Properties

- `PolicyDocument` (`string`, required): The body of the policy document you want to use for this topic. You can only add one policy per PolicyType. The policy must be in JSON string format. Length Constraints: Maximum length of 30720
- `PolicyName` (`string`, required): The name of the account policy
- `PolicyType` (`"DATA_PROTECTION_POLICY" | "FIELD_INDEX_POLICY" | "METRIC_EXTRACTION_POLICY" | "SUBSCRIPTION_FILTER_POLICY" | "TRANSFORMER_POLICY"`, required): Type of the policy.
- `AccountId` (`string`, optional): User account id
- `Scope` (`"ALL"`, optional): Scope for policy application
- `SelectionCriteria` (`string`, optional): Log group selection criteria to apply policy only to a subset of log groups. SelectionCriteria string can be up to 25KB and cloudwatchlogs determines the length of selectionCriteria by using its UTF-8 bytes

## Attributes

- `AccountId`
