# TargetGroupsConfigProperty

Describes the target groups to attach to a Spot Fleet.

Spot Fleet registers the running Spot Instances with these target groups.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 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_ec2 as ec2 } from 'aws-cdk-lib';
const targetGroupsConfigProperty: ec2.CfnSpotFleet.TargetGroupsConfigProperty = {
  targetGroups: [{
    arn: 'arn',
  }],
};
```

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_ec2 as ec2

target_groups_config_property = ec2.CfnSpotFleet.TargetGroupsConfigProperty(
    target_groups=[ec2.CfnSpotFleet.TargetGroupProperty(
        arn="arn"
    )]
)
```

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

TargetGroupsConfigProperty targetGroupsConfigProperty = TargetGroupsConfigProperty.builder()
        .targetGroups(List.of(TargetGroupProperty.builder()
                .arn("arn")
                .build()))
        .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.EC2;

var targetGroupsConfigProperty = new TargetGroupsConfigProperty {
    TargetGroups = new [] { new TargetGroupProperty {
        Arn = "arn"
    } }
};
```

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"

targetGroupsConfigProperty := &TargetGroupsConfigProperty{
	TargetGroups: []interface{}{
		&TargetGroupProperty{
			Arn: jsii.String("arn"),
		},
	},
}
```

## Properties

- `targetGroups`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSpotFleet.TargetGroupProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnSpotFleet.TargetGroupProperty.html)[] (required) — One or more target groups.
