CfnLayerVersionPermissionProps Struct
Properties for defining a CfnLayerVersionPermission.
Example
ts
// 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';
const cfnLayerVersionPermissionProps: lambda.CfnLayerVersionPermissionProps = {
action: 'action',
layerVersionArn: 'layerVersionArn',
principal: 'principal',
// the properties below are optional
organizationId: 'organizationId',
};
Properties
The API action that grants access to the layer.
For example, lambda:GetLayerVersion .
layerVersionArnstring | ILayerVersionReflayer_version_arntyping.Union[str, ILayerVersionRef]layerVersionArnStringLayerVersionArnstringLayerVersionArninterface{}required#The name or Amazon Resource Name (ARN) of the layer.
organizationIdoptionalstringorganization_idoptionalstrorganizationIdoptionalStringOrganizationIdoptionalstringOrganizationIdoptional*string#With the principal set to `*` , grant permission to all accounts in the specified organization.
An account ID, or `*` to grant layer usage permission to all accounts in an organization, or all AWS accounts (if `organizationId` is not specified).
For the last case, make sure that you really do want all AWS accounts to have usage permission to this layer.