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

A general URL-based output destination — an S3 bucket or an HTTP(S) endpoint.

Used by HLS, MS Smooth, and CMAF Ingest output groups. Each output group's `destinations`
prop is typed to the destination valid for its protocol, so an invalid pairing (e.g. a UDP
destination on an HLS group) is a compile-time error rather than a deploy-time failure.

- 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#L59)

## Example

```ts
declare const stack: Stack;
declare const input: medialive.IInput;
declare const bucket: s3.IBucket;
declare const video: medialive.EncodeConfiguration;

new medialive.Channel(stack, 'Channel', {
  inputs: [{ input }],
  availBlanking: {
    state: medialive.AvailBlankingState.ENABLED,
    image: medialive.FileLocation.fromBucket(bucket, 'slates/avail.png'),
  },
  blackoutSlate: {
    state: medialive.BlackoutSlateState.ENABLED,
    image: medialive.FileLocation.fromBucket(bucket, 'slates/blackout.png'),
  },
  outputGroups: [
    medialive.OutputGroupConfiguration.hls({
      name: 'hls',
      destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
      outputs: [{ encodes: [video], outputName: 'hls_out' }],
    }),
  ],
});
```

## Methods

- `toBucket(bucket: IBucket, prefix?: string): OutputDestination // chainable` (static) — Deliver to an S3 bucket (auto-grants write to the channel role).

- `url(url: string, options?: OutputDestinationOptions): OutputDestination // chainable` (static) — Deliver to a raw URL — typically an `https://` origin (or an `s3ssl://` path).
