interface CfnResourcePolicyProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Lambda.CfnResourcePolicyProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslambda#CfnResourcePolicyProps |
Java | software.amazon.awscdk.services.lambda.CfnResourcePolicyProps |
Python | aws_cdk.aws_lambda.CfnResourcePolicyProps |
TypeScript | aws-cdk-lib » aws_lambda » 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_lambda as lambda } from 'aws-cdk-lib';
declare const policyDocument: any;
const cfnResourcePolicyProps: lambda.CfnResourcePolicyProps = {
policyDocument: policyDocument,
resourceArn: 'resourceArn',
};
Properties
| Name | Type | Description |
|---|---|---|
| policy | any | The policy document you want to add to your LAM resource. |
| resource | string | The Amazon Resource Name (ARN) of the LAM resource you want to add the policy to. |
policyDocument
Type:
any
The policy document you want to add to your LAM resource.
This is formatted as a JSON string. For more information, see Working with resource-based policies in in the Developer Guide.
resourceArn
Type:
string
The Amazon Resource Name (ARN) of the LAM resource you want to add the policy to.
For a function, you can use a qualified or an unqualified ARN. The value must be a complete ARN, and the operation does not accept wildcard characters.

.NET
Go
Java
Python
TypeScript