CfnLayerVersionPermissionProps

class aws_cdk.aws_lambda.CfnLayerVersionPermissionProps(*, action, layer_version_arn, principal, organization_id=None)

Bases: object

Properties for defining a CfnLayerVersionPermission.

Parameters:
  • action (str) – The API action that grants access to the layer. For example, lambda:GetLayerVersion .

  • layer_version_arn (str) – The name or Amazon Resource Name (ARN) of the layer.

  • principal (str) – 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.

  • organization_id (Optional[str]) – With the principal set to * , grant permission to all accounts in the specified organization.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-layerversionpermission.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_

cfn_layer_version_permission_props = lambda.CfnLayerVersionPermissionProps(
    action="action",
    layer_version_arn="layerVersionArn",
    principal="principal",

    # the properties below are optional
    organization_id="organizationId"
)

Attributes

action

The API action that grants access to the layer.

For example, lambda:GetLayerVersion .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-layerversionpermission.html#cfn-lambda-layerversionpermission-action

layer_version_arn

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-layerversionpermission.html#cfn-lambda-layerversionpermission-layerversionarn

organization_id

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-layerversionpermission.html#cfn-lambda-layerversionpermission-organizationid

principal

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-layerversionpermission.html#cfn-lambda-layerversionpermission-principal