> **Experimental**
>
> `@aws-cdk/aws-mediapackagev2-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# InputSwitchConfiguration

Input Switch Configuration.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/channel.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0-alpha.0/packages/@aws-cdk/aws-mediapackagev2-alpha/lib/channel.ts#L179)

## Example

```ts
declare const stack: Stack;
declare const group: ChannelGroup;

const hlsChannel = new Channel(stack, 'HlsChannel', {
  channelGroup: group,
  input: InputConfiguration.hls(),
});

const cmafChannel = new Channel(stack, 'CmafChannel', {
  channelGroup: group,
  input: InputConfiguration.cmaf({
    inputSwitchConfiguration: {
      mqcsInputSwitching: true,
    },
    outputHeaders: [HeadersCMSD.MQCS],
  }),
});

const simpleCmafChannel = new Channel(stack, 'SimpleCmafChannel', {
  channelGroup: group,
  input: InputConfiguration.cmaf({
    outputHeaders: [HeadersCMSD.MQCS],
  }),
});
```

## Properties

- `mqcsInputSwitching`: boolean = false — When true, AWS Elemental MediaPackage performs input switching based on the MQCS.

  This setting is valid only when InputType is CMAF.

- `preferredInput`: [IngestEndpoint](/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.IngestEndpoint.html) — For CMAF inputs, indicates which input MediaPackage should prefer when both inputs have equal MQCS scores.

  **Default:** MediaPackage uses its default switching behavior

  Select 1 to prefer the first ingest endpoint, or 2 to prefer the second ingest endpoint.
  If you don't specify a preferred input, MediaPackage uses its default switching behavior when MQCS scores are equal.
