# ResourcePolicyProps

Properties to define Cloudwatch log group resource policy.

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

- Source: [`aws-logs/lib/policy.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-logs/lib/policy.ts#L12)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_logs as logs } from 'aws-cdk-lib';

declare const policyStatement: iam.PolicyStatement;
const resourcePolicyProps: logs.ResourcePolicyProps = {
  policyStatements: [policyStatement],
  resourcePolicyName: 'resourcePolicyName',
};
```

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_iam as iam
from aws_cdk import aws_logs as logs

# policy_statement: iam.PolicyStatement

resource_policy_props = logs.ResourcePolicyProps(
    policy_statements=[policy_statement],
    resource_policy_name="resourcePolicyName"
)
```

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.iam.*;
import software.amazon.awscdk.services.logs.*;

PolicyStatement policyStatement;

ResourcePolicyProps resourcePolicyProps = ResourcePolicyProps.builder()
        .policyStatements(List.of(policyStatement))
        .resourcePolicyName("resourcePolicyName")
        .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.IAM;
using Amazon.CDK.AWS.Logs;

PolicyStatement policyStatement;

var resourcePolicyProps = new ResourcePolicyProps {
    PolicyStatements = new [] { policyStatement },
    ResourcePolicyName = "resourcePolicyName"
};
```

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"
import "github.com/aws/aws-cdk-go/awscdk"

var policyStatement PolicyStatement

resourcePolicyProps := &ResourcePolicyProps{
	PolicyStatements: []PolicyStatement{
		policyStatement,
	},
	ResourcePolicyName: jsii.String("resourcePolicyName"),
}
```

## Properties

- `policyStatements`: [PolicyStatement](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyStatement.html)[] — Initial statements to add to the resource policy.

  **Default:** No statements

- `resourcePolicyName`: string — Name of the log group resource policy.

  **Default:** Uses a unique id based on the construct path
