CfnTargetGroupProps Struct
Properties for defining a CfnTargetGroup.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_vpclattice as vpclattice } from 'aws-cdk-lib';
const cfnTargetGroupProps: vpclattice.CfnTargetGroupProps = {
type: 'type',
// the properties below are optional
config: {
healthCheck: {
enabled: false,
healthCheckIntervalSeconds: 123,
healthCheckTimeoutSeconds: 123,
healthyThresholdCount: 123,
matcher: {
httpCode: 'httpCode',
},
path: 'path',
port: 123,
protocol: 'protocol',
protocolVersion: 'protocolVersion',
unhealthyThresholdCount: 123,
},
ipAddressType: 'ipAddressType',
lambdaEventStructureVersion: 'lambdaEventStructureVersion',
port: 123,
protocol: 'protocol',
protocolVersion: 'protocolVersion',
vpcIdentifier: 'vpcIdentifier',
},
name: 'name',
tags: [{
key: 'key',
value: 'value',
}],
targets: [{
id: 'id',
// the properties below are optional
port: 123,
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_vpclattice as vpclattice
cfn_target_group_props = vpclattice.CfnTargetGroupProps(
type="type",
# the properties below are optional
config=vpclattice.CfnTargetGroup.TargetGroupConfigProperty(
health_check=vpclattice.CfnTargetGroup.HealthCheckConfigProperty(
enabled=False,
health_check_interval_seconds=123,
health_check_timeout_seconds=123,
healthy_threshold_count=123,
matcher=vpclattice.CfnTargetGroup.MatcherProperty(
http_code="httpCode"
),
path="path",
port=123,
protocol="protocol",
protocol_version="protocolVersion",
unhealthy_threshold_count=123
),
ip_address_type="ipAddressType",
lambda_event_structure_version="lambdaEventStructureVersion",
port=123,
protocol="protocol",
protocol_version="protocolVersion",
vpc_identifier="vpcIdentifier"
),
name="name",
tags=[CfnTag(
key="key",
value="value"
)],
targets=[vpclattice.CfnTargetGroup.TargetProperty(
id="id",
# the properties below are optional
port=123
)]
)
java
// 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.*;
CfnTargetGroupProps cfnTargetGroupProps = CfnTargetGroupProps.builder()
.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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.VpcLattice;
var cfnTargetGroupProps = new CfnTargetGroupProps {
Type = "type",
// the properties below are optional
Config = new TargetGroupConfigProperty {
HealthCheck = new HealthCheckConfigProperty {
Enabled = false,
HealthCheckIntervalSeconds = 123,
HealthCheckTimeoutSeconds = 123,
HealthyThresholdCount = 123,
Matcher = new MatcherProperty {
HttpCode = "httpCode"
},
Path = "path",
Port = 123,
Protocol = "protocol",
ProtocolVersion = "protocolVersion",
UnhealthyThresholdCount = 123
},
IpAddressType = "ipAddressType",
LambdaEventStructureVersion = "lambdaEventStructureVersion",
Port = 123,
Protocol = "protocol",
ProtocolVersion = "protocolVersion",
VpcIdentifier = "vpcIdentifier"
},
Name = "name",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
Targets = new [] { new TargetProperty {
Id = "id",
// the properties below are optional
Port = 123
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnTargetGroupProps := &CfnTargetGroupProps{
Type: jsii.String("type"),
// the properties below are optional
Config: &TargetGroupConfigProperty{
HealthCheck: &HealthCheckConfigProperty{
Enabled: jsii.Boolean(false),
HealthCheckIntervalSeconds: jsii.Number(123),
HealthCheckTimeoutSeconds: jsii.Number(123),
HealthyThresholdCount: jsii.Number(123),
Matcher: &MatcherProperty{
HttpCode: jsii.String("httpCode"),
},
Path: jsii.String("path"),
Port: jsii.Number(123),
Protocol: jsii.String("protocol"),
ProtocolVersion: jsii.String("protocolVersion"),
UnhealthyThresholdCount: jsii.Number(123),
},
IpAddressType: jsii.String("ipAddressType"),
LambdaEventStructureVersion: jsii.String("lambdaEventStructureVersion"),
Port: jsii.Number(123),
Protocol: jsii.String("protocol"),
ProtocolVersion: jsii.String("protocolVersion"),
VpcIdentifier: jsii.String("vpcIdentifier"),
},
Name: jsii.String("name"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
Targets: []interface{}{
&TargetProperty{
Id: jsii.String("id"),
// the properties below are optional
Port: jsii.Number(123),
},
},
}
Properties
configoptionalIResolvable | CfnTargetGroup.configoptionaltyping.Union[IResolvable, TargetGroupConfigProperty]configoptionalIResolvableConfigoptionalIResolvableConfigoptionalinterface{} #The target group configuration.
The name of the target group.
notes
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.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #The tags for the target group.
targetsoptionalIResolvable | IResolvable | CfnTargetGroup.TargetProperty[]targetsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, TargetProperty]]]targetsoptionalIResolvableTargetsoptionalIResolvableTargetsoptionalinterface{} #Describes a target.
The type of target group.