Class CfnTargetGroup

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:59.257Z") @Stability(Stable) public class CfnTargetGroup extends CfnResource implements IInspectable, ITaggable
Creates a target group.

A target group is a collection of targets, or compute resources, that run your application or service. A target group can only be used by a single service.

For more information, see Target groups in the Amazon VPC Lattice User Guide .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.vpclattice.*;
 CfnTargetGroup cfnTargetGroup = CfnTargetGroup.Builder.create(this, "MyCfnTargetGroup")
         .type("type")
         // the properties below are optional
         .config(TargetGroupConfigProperty.builder()
                 .healthCheck(HealthCheckConfigProperty.builder()
                         .enabled(false)
                         .healthCheckIntervalSeconds(123)
                         .healthCheckTimeoutSeconds(123)
                         .healthyThresholdCount(123)
                         .matcher(MatcherProperty.builder()
                                 .httpCode("httpCode")
                                 .build())
                         .path("path")
                         .port(123)
                         .protocol("protocol")
                         .protocolVersion("protocolVersion")
                         .unhealthyThresholdCount(123)
                         .build())
                 .ipAddressType("ipAddressType")
                 .lambdaEventStructureVersion("lambdaEventStructureVersion")
                 .port(123)
                 .protocol("protocol")
                 .protocolVersion("protocolVersion")
                 .vpcIdentifier("vpcIdentifier")
                 .build())
         .name("name")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .targets(List.of(TargetProperty.builder()
                 .id("id")
                 // the properties below are optional
                 .port(123)
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTargetGroup

      protected CfnTargetGroup(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTargetGroup

      protected CfnTargetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTargetGroup

      @Stability(Stable) public CfnTargetGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTargetGroupProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the target group.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The date and time that the target group was created, specified in ISO-8601 format.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID of the target group.
    • getAttrLastUpdatedAt

      @Stability(Stable) @NotNull public String getAttrLastUpdatedAt()
      The date and time that the target group was last updated, specified in ISO-8601 format.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The operation's status.

      You can retry the operation if the status is CREATE_FAILED . However, if you retry it while the status is CREATE_IN_PROGRESS , there is no change in the status.

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getType

      @Stability(Stable) @NotNull public String getType()
      The type of target group.
    • setType

      @Stability(Stable) public void setType(@NotNull String value)
      The type of target group.
    • getConfig

      @Stability(Stable) @Nullable public Object getConfig()
      The target group configuration.
    • setConfig

      @Stability(Stable) public void setConfig(@Nullable IResolvable value)
      The target group configuration.
    • setConfig

      @Stability(Stable) public void setConfig(@Nullable CfnTargetGroup.TargetGroupConfigProperty value)
      The target group configuration.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the target group.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of the target group.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags for the target group.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags for the target group.
    • getTargets

      @Stability(Stable) @Nullable public Object getTargets()
      Describes a target.
    • setTargets

      @Stability(Stable) public void setTargets(@Nullable IResolvable value)
      Describes a target.
    • setTargets

      @Stability(Stable) public void setTargets(@Nullable List<Object> value)
      Describes a target.