> **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.
# IChannel

Represents a MediaPackage V2 Channel.

Extends: [IResource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResource.html), [IChannelRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_mediapackagev2.IChannelRef.html)
Implemented by: [Channel](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.Channel.html)
Obtainable from: [Channel.fromChannelArn](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.Channel.html#fromchannelarn), [Channel.fromChannelAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.Channel.html#fromchannelattributes)
Used as argument in: [MediaPackageV2Destination.channel](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-medialive-alpha.MediaPackageV2Destination.html#channel)

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

## Properties

- `channelArn`: string — The Amazon Resource Name (ARN) associated with the resource.

- `channelGroup`: [IChannelGroup](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.IChannelGroup.html) — The channel group this channel belongs to.

  Only available when the channel was created in the same stack.
  Undefined for imported channels.

- `channelGroupName`: string — The name that describes the channel group.

  The name is the primary identifier for the channel group.

- `channelName`: string — The name that describes the channel.

  The name is the primary identifier for the channel.

- `channelRef`: [ChannelReference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_mediapackagev2.ChannelReference.html) — A reference to a Channel resource.

- `createdAt`: string — The date and time the channel was created.

- `env`: [ResourceEnvironment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — The environment this resource belongs to.

  For resources that are created and managed in a Stack (those created by
  creating new class instances like `new Role()`, `new Bucket()`, etc.), this
  is always the same as the environment of the stack they belong to.

  For referenced resources (those obtained from referencing methods like
  `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
  different than the stack they were imported into.

- `grants`: [ChannelGrants](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.ChannelGrants.html) — Grants IAM resource policy to the role used to write to MediaPackage V2 Channel.

- `ingestEndpointUrls`: string[] — The ingest endpoint URLs for the channel.

- `modifiedAt`: string — The date and time the channel was modified.

- `node`: [Node](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `region`: string — The AWS region where this channel lives.

- `stack`: [Stack](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this resource is defined.

## Methods

- `addOriginEndpoint(id: string, options: OriginEndpointOptions): OriginEndpoint` — Add Origin Endpoint for this Channel.

- `addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResult` — Configure channel policy.

  You can only add 1 ChannelPolicy to a Channel.
  If you have already defined one, function will append the policy already created.

- `applyRemovalPolicy(policy: RemovalPolicy): void` — Apply the given removal policy to this resource.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).

- `metric(metricName: string, props?: MetricOptions): Metric` — Create a CloudWatch metric.

  **Parameters**

  - `metricName` — name of the metric.
  - `props` — metric options.

- `metricEgressBytes(options?: MetricOptions): Metric` — Returns Metric for Egress Bytes.

- `metricEgressRequestCount(options?: MetricOptions): Metric` — Returns Metric for Egress Request Count.

- `metricEgressResponseTime(options?: MetricOptions): Metric` — Returns Metric for Egress Response time.

- `metricIngressBytes(options?: MetricOptions): Metric` — Returns Metric for Ingress Bytes.

- `metricIngressRequestCount(options?: MetricOptions): Metric` — Returns Metric for Ingress Request Count.

- `metricIngressResponseTime(options?: MetricOptions): Metric` — Returns Metric for Ingress response time.

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
