# AlternateTargetConfig

Configuration returned by AlternateTargetConfiguration.bind().

- Source: [`aws-ecs/lib/alternate-target-configuration.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ecs/lib/alternate-target-configuration.ts#L53)
- Type last changed: v2.211.0 · 13 Aug 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const alternateTargetConfig: ecs.AlternateTargetConfig = {
  alternateTargetGroupArn: 'alternateTargetGroupArn',
  roleArn: 'roleArn',

  // the properties below are optional
  productionListenerRule: 'productionListenerRule',
  testListenerRule: 'testListenerRule',
};
```

## Properties

- `alternateTargetGroupArn`: string (required) — The ARN of the alternate target group.

- `productionListenerRule`: string = none — The production listener rule ARN (ALB) or listener ARN (NLB).

- `roleArn`: string (required) — The IAM role ARN for the configuration.

  **Default:** a new role will be created

- `testListenerRule`: string = none — The test listener rule ARN (ALB) or listener ARN (NLB).
