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

Input configuration for a MediaPackage V2 Channel.

Use the static factory methods to create instances:
- InputConfiguration.hls() for HLS input
- InputConfiguration.cmaf() for CMAF input with optional CMAF-specific features

Obtainable from: InputConfiguration.cmaf, InputConfiguration.hls

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

## Example

TypeScript:

```ts
declare const stack: Stack;
const group = new ChannelGroup(stack, 'MyChannelGroup', {
    channelGroupName: 'my-test-channel-group',
});

const channel = new Channel(stack, 'MyChannel', {
    channelGroup: group,
    channelName: 'my-testchannel',
    input: InputConfiguration.cmaf(),
});

const endpoint = new OriginEndpoint(stack, 'MyOriginEndpoint', {
    channel,
    originEndpointName: 'my-test-endpoint',
    segment: Segment.cmaf(),
    manifests: [Manifest.hls({
        manifestName: 'index',
    })],
});
```

Python:

```python
# stack: Stack

group = ChannelGroup(stack, "MyChannelGroup",
    channel_group_name="my-test-channel-group"
)

channel = Channel(stack, "MyChannel",
    channel_group=group,
    channel_name="my-testchannel",
    input=InputConfiguration.cmaf()
)

endpoint = OriginEndpoint(stack, "MyOriginEndpoint",
    channel=channel,
    origin_endpoint_name="my-test-endpoint",
    segment=Segment.cmaf(),
    manifests=[Manifest.hls(
        manifest_name="index"
    )]
)
```

Java:

```java
Stack stack;

ChannelGroup group = ChannelGroup.Builder.create(stack, "MyChannelGroup")
        .channelGroupName("my-test-channel-group")
        .build();

Channel channel = Channel.Builder.create(stack, "MyChannel")
        .channelGroup(group)
        .channelName("my-testchannel")
        .input(InputConfiguration.cmaf())
        .build();

OriginEndpoint endpoint = OriginEndpoint.Builder.create(stack, "MyOriginEndpoint")
        .channel(channel)
        .originEndpointName("my-test-endpoint")
        .segment(Segment.cmaf())
        .manifests(List.of(Manifest.hls(HlsManifestConfiguration.builder()
                .manifestName("index")
                .build())))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaPackageV2.Alpha
Stack stack;

var group = new ChannelGroup(stack, "MyChannelGroup", new ChannelGroupProps {
    ChannelGroupName = "my-test-channel-group"
});

var channel = new Channel(stack, "MyChannel", new ChannelProps {
    ChannelGroup = group,
    ChannelName = "my-testchannel",
    Input = InputConfiguration.Cmaf()
});

var endpoint = new OriginEndpoint(stack, "MyOriginEndpoint", new OriginEndpointProps {
    Channel = channel,
    OriginEndpointName = "my-test-endpoint",
    Segment = Segment.Cmaf(),
    Manifests = new [] { Manifest.Hls(new HlsManifestConfiguration {
        ManifestName = "index"
    }) }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsmediapackagev2alpha/v2
var stack Stack

group := awsmediapackagev2alpha.NewChannelGroup(stack, jsii.String("MyChannelGroup"), &ChannelGroupProps{
	ChannelGroupName: jsii.String("my-test-channel-group"),
})

channel := awsmediapackagev2alpha.NewChannel(stack, jsii.String("MyChannel"), &ChannelProps{
	ChannelGroup: group,
	ChannelName: jsii.String("my-testchannel"),
	Input: awsmediapackagev2alpha.InputConfiguration_Cmaf(),
})

endpoint := awsmediapackagev2alpha.NewOriginEndpoint(stack, jsii.String("MyOriginEndpoint"), &OriginEndpointProps{
	Channel: Channel,
	OriginEndpointName: jsii.String("my-test-endpoint"),
	Segment: awsmediapackagev2alpha.Segment_Cmaf(),
	Manifests: []Manifest{
		awsmediapackagev2alpha.Manifest_Hls(&HlsManifestConfiguration{
			ManifestName: jsii.String("index"),
		}),
	},
})
```

## Properties

- `inputSwitchConfiguration`: [InputSwitchConfiguration](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.InputSwitchConfiguration.html) — Input switch configuration (CMAF only).

- `inputType`: [InputType](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.InputType.html) — The input type (HLS or CMAF).

- `outputHeaders`: [HeadersCMSD](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.HeadersCMSD.html)[] — Output headers configuration (CMAF only).

## Methods

- `cmaf(props?: CmafInputProps): InputConfiguration // chainable` (static) — Create a CMAF input configuration.

  **Parameters**

  - `props` — CMAF-specific configuration including input switching and output headers.

- `hls(): InputConfiguration // chainable` (static) — Create an HLS input configuration.
