Class CfnTargetGroup.Builder

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

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

    • create

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

      @Stability(Stable) public CfnTargetGroup.Builder type(String type)
      The type of target group.

      Parameters:
      type - The type of target group. This parameter is required.
      Returns:
      this
    • config

      @Stability(Stable) public CfnTargetGroup.Builder config(IResolvable config)
      The target group configuration.

      If type is set to LAMBDA , this parameter doesn't apply.

      Parameters:
      config - The target group configuration. This parameter is required.
      Returns:
      this
    • config

      @Stability(Stable) public CfnTargetGroup.Builder config(CfnTargetGroup.TargetGroupConfigProperty config)
      The target group configuration.

      If type is set to LAMBDA , this parameter doesn't apply.

      Parameters:
      config - The target group configuration. This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public CfnTargetGroup.Builder name(String name)
      The name of the target group.

      The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.

      If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.

      Parameters:
      name - The name of the target group. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnTargetGroup.Builder tags(List<? extends CfnTag> tags)
      The tags for the target group.

      Parameters:
      tags - The tags for the target group. This parameter is required.
      Returns:
      this
    • targets

      @Stability(Stable) public CfnTargetGroup.Builder targets(IResolvable targets)
      Describes a target.

      Parameters:
      targets - Describes a target. This parameter is required.
      Returns:
      this
    • targets

      @Stability(Stable) public CfnTargetGroup.Builder targets(List<? extends Object> targets)
      Describes a target.

      Parameters:
      targets - Describes a target. This parameter is required.
      Returns:
      this
    • build

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