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

A MediaPackage V2 destination for a MediaLive output group.

Use the static factory method to create.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/destinations.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-medialive-alpha/lib/destinations.ts#L336)

## Example

```ts
declare const primary: mediapackagev2.IChannel;
declare const hdVideo: medialive.EncodeConfiguration;

medialive.OutputGroupConfiguration.mediaPackageV2PerPipeline({
  name: 'emp',
  destinations: [
    // destinations[0] → Pipeline 0, destinations[1] → Pipeline 1
    medialive.MediaPackageV2Destination.channel(primary, medialive.MediaPackageV2EndpointId.ENDPOINT_2),
    medialive.MediaPackageV2Destination.channel(primary, medialive.MediaPackageV2EndpointId.ENDPOINT_1),
  ],
  outputs: [
    { encode: hdVideo, outputName: 'hd' },
  ],
});
```

## Initializer

```ts
new MediaPackageV2Destination()
```

## Methods

- `channel(channel: IChannel, endpointId?: MediaPackageV2EndpointId): MediaPackageV2Destination // chainable` (static) — Create a MediaPackage V2 destination.

  The region is resolved from the channel's `region` property. Import the MediaPackage V2
  channel with its region (e.g. via `fromChannelAttributes`) for cross-region delivery.

  **Parameters**

  - `channel` — The MediaPackage V2 channel to send output to.
  - `endpointId` — The pipeline endpoint to send to.
