Class CfnLayerVersionPermissionProps.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.CfnLayerVersionPermissionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLayerVersionPermissionProps>
- Enclosing interface:
CfnLayerVersionPermissionProps
@Stability(Stable)
public static final class CfnLayerVersionPermissionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLayerVersionPermissionProps>
A builder for
CfnLayerVersionPermissionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnLayerVersionPermissionProps.getAction()
build()
Builds the configured instance.layerVersionArn
(String layerVersionArn) Sets the value ofCfnLayerVersionPermissionProps.getLayerVersionArn()
organizationId
(String organizationId) Sets the value ofCfnLayerVersionPermissionProps.getOrganizationId()
Sets the value ofCfnLayerVersionPermissionProps.getPrincipal()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
action
Sets the value ofCfnLayerVersionPermissionProps.getAction()
- Parameters:
action
- The API action that grants access to the layer. This parameter is required. For example,lambda:GetLayerVersion
.- Returns:
this
-
layerVersionArn
@Stability(Stable) public CfnLayerVersionPermissionProps.Builder layerVersionArn(String layerVersionArn) Sets the value ofCfnLayerVersionPermissionProps.getLayerVersionArn()
- Parameters:
layerVersionArn
- The name or Amazon Resource Name (ARN) of the layer. This parameter is required.- Returns:
this
-
principal
Sets the value ofCfnLayerVersionPermissionProps.getPrincipal()
- 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. For the last case, make sure that you really do want all AWS accounts to have usage permission to this layer.- Returns:
this
-
organizationId
@Stability(Stable) public CfnLayerVersionPermissionProps.Builder organizationId(String organizationId) Sets the value ofCfnLayerVersionPermissionProps.getOrganizationId()
- Parameters:
organizationId
- With the principal set to*
, grant permission to all accounts in the specified organization.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLayerVersionPermissionProps>
- Returns:
- a new instance of
CfnLayerVersionPermissionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-