CfnLayerVersionPermissionPropsMixin
- class aws_cdk.mixins_preview.aws_lambda.mixins.CfnLayerVersionPermissionPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::Lambda::LayerVersionPermissionresource adds permissions to the resource-based policy of a version of an Lambda layer . Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all AWS accounts, or all accounts in an organization.Since the release of the UpdateReplacePolicy both
UpdateReplacePolicyandDeletionPolicyare required to protect your Resources/LayerPermissions from deletion.- See:
- CloudformationResource:
AWS::Lambda::LayerVersionPermission
- Mixin:
true
- 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.mixins_preview import mixins from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins cfn_layer_version_permission_props_mixin = lambda_mixins.CfnLayerVersionPermissionPropsMixin(lambda_mixins.CfnLayerVersionPermissionMixinProps( action="action", layer_version_arn="layerVersionArn", organization_id="organizationId", principal="principal" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Lambda::LayerVersionPermission.- Parameters:
props (
Union[CfnLayerVersionPermissionMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['action', 'layerVersionArn', 'organizationId', 'principal']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental