aws-cdk-lib.aws_cloudtrail.CfnResourcePolicyProps

interface CfnResourcePolicyProps

LanguageType name
.NETAmazon.CDK.AWS.CloudTrail.CfnResourcePolicyProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudtrail#CfnResourcePolicyProps
Javasoftware.amazon.awscdk.services.cloudtrail.CfnResourcePolicyProps
Pythonaws_cdk.aws_cloudtrail.CfnResourcePolicyProps
TypeScript aws-cdk-lib » aws_cloudtrail » CfnResourcePolicyProps

Properties for defining a CfnResourcePolicy.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudtrail as cloudtrail } from 'aws-cdk-lib';

declare const resourcePolicy: any;
const cfnResourcePolicyProps: cloudtrail.CfnResourcePolicyProps = {
  resourceArn: 'resourceArn',
  resourcePolicy: resourcePolicy,
};

Properties

NameTypeDescription
resourceArnstringThe Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy.
resourcePolicyanyA JSON-formatted string for an AWS resource-based policy.

resourceArn

Type: string

The Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy.

The following is the format of a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel .


resourcePolicy

Type: any

A JSON-formatted string for an AWS resource-based policy.

The following are requirements for the resource policy:

  • Contains only one action: cloudtrail-data:PutAuditEvents
  • Contains at least one statement. The policy can have a maximum of 20 statements.
  • Each statement contains at least one principal. A statement can have a maximum of 50 principals.