Class CfnFunction.Builder

java.lang.Object
software.amazon.awscdk.services.cloudfront.CfnFunction.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFunction>
Enclosing class:
CfnFunction

@Stability(Stable) public static final class CfnFunction.Builder extends Object implements software.amazon.jsii.Builder<CfnFunction>
A fluent builder for CfnFunction.
  • Method Details

    • create

      @Stability(Stable) public static CfnFunction.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 CfnFunction.Builder.
    • functionCode

      @Stability(Stable) public CfnFunction.Builder functionCode(String functionCode)
      The function code.

      For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide .

      Parameters:
      functionCode - The function code. This parameter is required.
      Returns:
      this
    • functionConfig

      @Stability(Stable) public CfnFunction.Builder functionConfig(IResolvable functionConfig)
      Contains configuration information about a CloudFront function.

      Parameters:
      functionConfig - Contains configuration information about a CloudFront function. This parameter is required.
      Returns:
      this
    • functionConfig

      @Stability(Stable) public CfnFunction.Builder functionConfig(CfnFunction.FunctionConfigProperty functionConfig)
      Contains configuration information about a CloudFront function.

      Parameters:
      functionConfig - Contains configuration information about a CloudFront function. This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public CfnFunction.Builder name(String name)
      A name to identify the function.

      Parameters:
      name - A name to identify the function. This parameter is required.
      Returns:
      this
    • autoPublish

      @Stability(Stable) public CfnFunction.Builder autoPublish(Boolean autoPublish)
      A flag that determines whether to automatically publish the function to the LIVE stage when it’s created.

      To automatically publish to the LIVE stage, set this property to true .

      Parameters:
      autoPublish - A flag that determines whether to automatically publish the function to the LIVE stage when it’s created. This parameter is required.
      Returns:
      this
    • autoPublish

      @Stability(Stable) public CfnFunction.Builder autoPublish(IResolvable autoPublish)
      A flag that determines whether to automatically publish the function to the LIVE stage when it’s created.

      To automatically publish to the LIVE stage, set this property to true .

      Parameters:
      autoPublish - A flag that determines whether to automatically publish the function to the LIVE stage when it’s created. This parameter is required.
      Returns:
      this
    • functionMetadata

      @Stability(Stable) public CfnFunction.Builder functionMetadata(IResolvable functionMetadata)
      Contains metadata about a CloudFront function.

      Parameters:
      functionMetadata - Contains metadata about a CloudFront function. This parameter is required.
      Returns:
      this
    • functionMetadata

      @Stability(Stable) public CfnFunction.Builder functionMetadata(CfnFunction.FunctionMetadataProperty functionMetadata)
      Contains metadata about a CloudFront function.

      Parameters:
      functionMetadata - Contains metadata about a CloudFront function. This parameter is required.
      Returns:
      this
    • build

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