Resource Policy for SecretsManager Secrets. 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-secretsmanager';Or use the module namespace:
import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
// secretsmanager.ResourcePolicyConfiguration passed to the constructor as ResourcePolicyProps.
secretRequiredISecretThe secret to attach a resource-based permissions policy.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-secretsmanager