# CfnResourcePolicyProps

Properties for defining a `CfnResourcePolicy`.

Extends: CfnResourcePolicyProps
Used as props by: CfnResourcePolicy

- Source: Generated code
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

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

declare const resourcePolicy: any;
const cfnResourcePolicyProps: secretsmanager.CfnResourcePolicyProps = {
  resourcePolicy: resourcePolicy,
  secretId: 'secretId',

  // the properties below are optional
  blockPublicPolicy: false,
};
```

## Properties

- `blockPublicPolicy`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether to block resource-based policies that allow broad access to the secret.

  By default, Secrets Manager blocks policies that allow broad access, for example those that use a wildcard for the principal.

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

  For example policies, see [Permissions policy examples](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html) .

- `secretId`: string | [ISecretRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_secretsmanager.ISecretRef.html) (required) — The ARN or name of the secret to attach the resource-based policy.

  For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.
