# TargetGroupConfigProperty

Describes the configuration of a target group.

For more information, see [Target groups](https://docs.aws.amazon.com/vpc-lattice/latest/ug/target-groups.html) in the *Amazon VPC Lattice User Guide* .

- Source: Generated at build time
- Type last changed: v2.97.0 · 22 Sep 2023

## Example

TypeScript:

```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 targetGroupConfigProperty: vpclattice.CfnTargetGroup.TargetGroupConfigProperty = {
  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',
};
```

Python:

```python
# 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

target_group_config_property = 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"
)
```

Java:

```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.*;

TargetGroupConfigProperty targetGroupConfigProperty = 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();
```

C# / .NET:

```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 targetGroupConfigProperty = 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"
};
```

Golang:

```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"

targetGroupConfigProperty := &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"),
}
```

## Properties

- `healthCheck`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTargetGroup.HealthCheckConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_vpclattice.CfnTargetGroup.HealthCheckConfigProperty.html) — The health check configuration.

  Not supported if the target group type is `LAMBDA` or `ALB` .

- `ipAddressType`: string = "IPV4" — The type of IP address used for the target group.

  Supported only if the target group type is `IP` . The default is `IPV4` .

- `lambdaEventStructureVersion`: string — The version of the event structure that your Lambda function receives.

  Supported only if the target group type is `LAMBDA` . The default is `V1` .

- `port`: number — The port on which the targets are listening.

  For HTTP, the default is 80. For HTTPS, the default is 443. Not supported if the target group type is `LAMBDA` .

- `protocol`: string — The protocol to use for routing traffic to the targets.

  The default is the protocol of the target group. Not supported if the target group type is `LAMBDA` .

- `protocolVersion`: string = "HTTP1" — The protocol version.

  The default is `HTTP1` . Not supported if the target group type is `LAMBDA` .

- `vpcIdentifier`: string — The ID of the VPC.

  Not supported if the target group type is `LAMBDA` .
