Class CfnTargetGroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.vpclattice.CfnTargetGroup
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,ITargetGroupRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:47.145Z")
@Stability(Stable)
public class CfnTargetGroup
extends CfnResource
implements IInspectable, ITargetGroupRef, 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnTargetGroup.static interfaceDescribes the health check configuration of a target group.static interfaceDescribes the codes to use when checking for a successful response from a target for health checks.static interfaceDescribes the configuration of a target group.static interfaceDescribes a target.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.vpclattice.ITargetGroupRef
ITargetGroupRef.Jsii$Default, ITargetGroupRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnTargetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnTargetGroup(software.amazon.jsii.JsiiObjectRef objRef) CfnTargetGroup(software.constructs.Construct scope, String id, CfnTargetGroupProps props) Create a newAWS::VpcLattice::TargetGroup. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForTargetGroup(ITargetGroupRef resource) The Amazon Resource Name (ARN) of the target group.The date and time that the target group was created, specified in ISO-8601 format.The ID of the target group.The date and time that the target group was last updated, specified in ISO-8601 format.The operation's status.The target group configuration.getName()The name of the target group.getTags()Tag Manager which manages the tags for this resource.The tags for the target group.A reference to a TargetGroup resource.Describes a target.getType()The type of target group.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnTargetGroup.renderProperties(Map<String, Object> props) voidsetConfig(IResolvable value) The target group configuration.voidThe target group configuration.voidThe name of the target group.voidsetTagsRaw(List<CfnTag> value) The tags for the target group.voidsetTargets(List<Object> value) Describes a target.voidsetTargets(IResolvable value) Describes a target.voidThe type of target group.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::VpcLattice::TargetGroup.- 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
-
arnForTargetGroup
@Stability(Stable) @NotNull public static String arnForTargetGroup(@NotNull ITargetGroupRef resource) - Parameters:
resource- This parameter is required.
-
isCfnTargetGroup
Checks whether the given object is a CfnTargetGroup.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the target group. -
getAttrCreatedAt
The date and time that the target group was created, specified in ISO-8601 format. -
getAttrId
The ID of the target group. -
getAttrLastUpdatedAt
The date and time that the target group was last updated, specified in ISO-8601 format. -
getAttrStatus
The operation's status.You can retry the operation if the status is
CREATE_FAILED. However, if you retry it while the status isCREATE_IN_PROGRESS, there is no change in the status. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getTargetGroupRef
A reference to a TargetGroup resource.- Specified by:
getTargetGroupRefin interfaceITargetGroupRef
-
getType
The type of target group. -
setType
The type of target group. -
getConfig
The target group configuration.Returns union: either
IResolvableorCfnTargetGroup.TargetGroupConfigProperty -
setConfig
The target group configuration. -
setConfig
The target group configuration. -
getName
The name of the target group. -
setName
The name of the target group. -
getTagsRaw
The tags for the target group. -
setTagsRaw
The tags for the target group. -
getTargets
Describes a target.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnTargetGroup.TargetProperty> -
setTargets
Describes a target. -
setTargets
Describes a target.
-