Skip to main content

account_policy

Gets an individual account_policy resource

Overview

Nameaccount_policy
TypeResource
Descriptionaccount_policy
Idawscc.logs.account_policy

Fields

NameDatatypeDescription
account_idstringUser account id
policy_namestringThe name of the account policy
policy_documentstringThe body of the policy document you want to use for this topic.<br/><br/>You can only add one policy per PolicyType.<br/><br/>The policy must be in JSON string format.<br/><br/>Length Constraints: Maximum length of 30720
policy_typestringType of the policy.
scopestringScope for policy application
selection_criteriastringLog 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
regionstringAWS region.

Methods

Currently only SELECT is supported for this resource resource.

Example

SELECT
region,
account_id,
policy_name,
policy_document,
policy_type,
scope,
selection_criteria
FROM awscc.logs.account_policy
WHERE data__Identifier = '<AccountId>|<PolicyType>|<PolicyName>';

Permissions

To operate on the account_policy resource, the following permissions are required:

Read

logs:DescribeAccountPolicies

Update

logs:PutAccountPolicy,
logs:PutDataProtectionPolicy,
logs:DescribeAccountPolicies,
logs:DeleteAccountPolicy,
logs:DeleteDataProtectionPolicy,
logs:CreateLogDelivery,
logs:PutSubscriptionFilter,
logs:DeleteSubscriptionFilter,
s3:REST.PUT.OBJECT,
firehose:TagDeliveryStream,
iam:PassRole

Delete

logs:DeleteAccountPolicy,
logs:DeleteDataProtectionPolicy,
logs:DescribeAccountPolicies,
logs:DeleteSubscriptionFilter,
iam:PassRole