aws-cdk-lib.aws_lambda.CfnLayerVersionPermissionProps

interface CfnLayerVersionPermissionProps

LanguageType name
.NETAmazon.CDK.AWS.Lambda.CfnLayerVersionPermissionProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslambda#CfnLayerVersionPermissionProps
Javasoftware.amazon.awscdk.services.lambda.CfnLayerVersionPermissionProps
Pythonaws_cdk.aws_lambda.CfnLayerVersionPermissionProps
TypeScript aws-cdk-lib » aws_lambda » CfnLayerVersionPermissionProps

Properties for defining a CfnLayerVersionPermission.

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';
const cfnLayerVersionPermissionProps: lambda.CfnLayerVersionPermissionProps = {
  action: 'action',
  layerVersionArn: 'layerVersionArn',
  principal: 'principal',

  // the properties below are optional
  organizationId: 'organizationId',
};

Properties

NameTypeDescription
actionstringThe API action that grants access to the layer.
layerVersionArnstringThe name or Amazon Resource Name (ARN) of the layer.
principalstringAn account ID, or * to grant layer usage permission to all accounts in an organization, or all AWS accounts (if organizationId is not specified).
organizationId?stringWith the principal set to * , grant permission to all accounts in the specified organization.

action

Type: string

The API action that grants access to the layer.

For example, lambda:GetLayerVersion .


layerVersionArn

Type: string

The name or Amazon Resource Name (ARN) of the layer.


principal

Type: string

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.


organizationId?

Type: string (optional)

With the principal set to * , grant permission to all accounts in the specified organization.