AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Logs::ResourcePolicy

CfnResourcePolicy

Creates or updates a resource policy that allows other AWS services to put log events to this account. An account can have up to 10 resource policies per AWS Region.

Import

import { CfnResourcePolicy } from 'aws-cdk-lib/aws-logs';

Or use the module namespace:

import * as logs from 'aws-cdk-lib/aws-logs';
// logs.CfnResourcePolicy

Properties

Configuration passed to the constructor as CfnResourcePolicyProps.

policyDocumentRequired
string

The details of the policy. It must be formatted in JSON, and you must use backslashes to escape characters that need to be escaped in JSON strings, such as double quote marks.

policyNameRequired
string

The name of the resource policy.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter