# CfnResourcePolicyProps

Properties for defining a `CfnResourcePolicy`.

Used as props by: [CfnResourcePolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudtrail.CfnResourcePolicy.html)

- Source: Generated at build time
- Type last changed: v2.64.0 · 9 Feb 2023

## Example

TypeScript:

```ts
// 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,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudtrail as cloudtrail

# resource_policy: Any

cfn_resource_policy_props = cloudtrail.CfnResourcePolicyProps(
    resource_arn="resourceArn",
    resource_policy=resource_policy
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudtrail.*;

Object resourcePolicy;

CfnResourcePolicyProps cfnResourcePolicyProps = CfnResourcePolicyProps.builder()
        .resourceArn("resourceArn")
        .resourcePolicy(resourcePolicy)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudTrail;

var resourcePolicy;

var cfnResourcePolicyProps = new CfnResourcePolicyProps {
    ResourceArn = "resourceArn",
    ResourcePolicy = resourcePolicy
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var resourcePolicy interface{}

cfnResourcePolicyProps := &CfnResourcePolicyProps{
	ResourceArn: jsii.String("resourceArn"),
	ResourcePolicy: resourcePolicy,
}
```

## Properties

- `resourceArn`: string (required) — The Amazon Resource Name (ARN) of the CloudTrail event data store, dashboard, or channel attached to the resource-based policy.

  Example event data store ARN format: `arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE`

  Example dashboard ARN format: `arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash`

  Example channel ARN format: `arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890`

- `resourcePolicy`: any (required) — A JSON-formatted string for an AWS resource-based policy.

  For example resource-based policies, see [CloudTrail resource-based policy examples](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html) in the *CloudTrail User Guide* .
