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 Details

    • create

      @Stability(Stable) public static CfnLayerVersionPermission.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnLayerVersionPermission.Builder.
    • action

      @Stability(Stable) public CfnLayerVersionPermission.Builder action(String 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

      @Stability(Stable) public CfnLayerVersionPermission.Builder layerVersionArn(String 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

      @Stability(Stable) public CfnLayerVersionPermission.Builder principal(String 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.

      Parameters:
      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). This parameter is required.
      Returns:
      this
    • organizationId

      @Stability(Stable) public CfnLayerVersionPermission.Builder organizationId(String 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

      @Stability(Stable) public CfnLayerVersionPermission build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnLayerVersionPermission>
      Returns:
      a newly built instance of CfnLayerVersionPermission.