Resource Policy for CloudWatch Log Groups. Policies define the operations that are allowed on this resource. You almost never need to define this construct directly. All AWS resources that support resource policies have a method called `addToResourcePolicy()`, which will automatically create a new resource policy if one doesn't exist yet, otherwise it will add to the existing policy. Prefer to use `addToResourcePolicy()` instead.
import { ResourcePolicy } from 'aws-cdk-lib/aws-logs';Or use the module namespace:
import * as logs from 'aws-cdk-lib/aws-logs';
// logs.ResourcePolicyConfiguration passed to the constructor as ResourcePolicyProps.
policyStatementsOptionalPolicyStatement[]Initial statements to add to the resource policy.
Default: - No statements
resourcePolicyNameOptionalstringName of the log group resource policy.
Default: - Uses a unique id based on the construct path
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-logs