Class CfnLayerVersionPermission.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.CfnLayerVersionPermission.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLayerVersionPermission>
- Enclosing class:
CfnLayerVersionPermission
@Stability(Stable)
public static final class CfnLayerVersionPermission.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLayerVersionPermission>
A fluent builder for
CfnLayerVersionPermission
.-
Method Summary
Modifier and TypeMethodDescriptionThe API action that grants access to the layer.build()
layerVersionArn
(String layerVersionArn) The name or Amazon Resource Name (ARN) of the layer.organizationId
(String organizationId) 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 (iforganizationId
is not specified).
-
Method Details
-
create
@Stability(Stable) public static CfnLayerVersionPermission.Builder create(Construct scope, String id) - Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnLayerVersionPermission.Builder
.
-
action
The API action that grants access to the layer.For example,
lambda:GetLayerVersion
.- Parameters:
action
- The API action that grants access to the layer. This parameter is required.- Returns:
this
-
layerVersionArn
The name or Amazon Resource Name (ARN) of the layer.- Parameters:
layerVersionArn
- The name or Amazon Resource Name (ARN) of the layer. This parameter is required.- Returns:
this
-
principal
An account ID, or*
to grant layer usage permission to all accounts in an organization, or all AWS accounts (iforganizationId
is not specified).For the last case, make sure that you really do want all AWS accounts to have usage permission to this layer.
- Parameters:
principal
- An account ID, or*
to grant layer usage permission to all accounts in an organization, or all AWS accounts (iforganizationId
is not specified). This parameter is required.- Returns:
this
-
organizationId
With the principal set to*
, grant permission to all accounts in the specified organization.- Parameters:
organizationId
- With the principal set to*
, grant permission to all accounts in the specified organization. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLayerVersionPermission>
- Returns:
- a newly built instance of
CfnLayerVersionPermission
.
-