java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.mediapackagev2.alpha.Channel
All Implemented Interfaces:
IEnvironmentAware, IChannelRef, IResource, IChannel, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-04-02T09:32:03.687Z") @Stability(Experimental) public class Channel extends Resource implements IChannel
(experimental) Defines an AWS Elemental MediaPackage V2 Channel.

Example:

 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();
 
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Experimental) public static final String PROPERTY_INJECTION_ID
      (experimental) Uniquely identifies this class.
  • Constructor Details

    • Channel

      protected Channel(software.amazon.jsii.JsiiObjectRef objRef)
    • Channel

      protected Channel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Channel

      @Stability(Experimental) public Channel(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ChannelProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromChannelAttributes

      @Stability(Experimental) @NotNull public static IChannel fromChannelAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ChannelAttributes attrs)
      (experimental) Creates a Channel construct that represents an external (imported) Channel.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • addOriginEndpoint

      @Stability(Experimental) @NotNull public OriginEndpoint addOriginEndpoint(@NotNull String id, @NotNull OriginEndpointOptions options)
      (experimental) Add Origin Endpoint for this Channel.

      Specified by:
      addOriginEndpoint in interface IChannel
      Parameters:
      id - This parameter is required.
      options - This parameter is required.
    • addToResourcePolicy

      @Stability(Experimental) @NotNull public AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement)
      (experimental) 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.

      Specified by:
      addToResourcePolicy in interface IChannel
      Parameters:
      statement - This parameter is required.
    • metric

      @Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions options)
      (experimental) Create a CloudWatch metric.

      Specified by:
      metric in interface IChannel
      Parameters:
      metricName - name of the metric. This parameter is required.
      options - metric options.
    • metric

      @Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName)
      (experimental) Create a CloudWatch metric.

      Specified by:
      metric in interface IChannel
      Parameters:
      metricName - name of the metric. This parameter is required.
    • metricEgressBytes

      @Stability(Experimental) @NotNull public Metric metricEgressBytes(@Nullable MetricOptions options)
      (experimental) Returns Metric for Egress Bytes.

      Default: - sum over 60 seconds

      Specified by:
      metricEgressBytes in interface IChannel
      Parameters:
      options -
    • metricEgressBytes

      @Stability(Experimental) @NotNull public Metric metricEgressBytes()
      (experimental) Returns Metric for Egress Bytes.

      Default: - sum over 60 seconds

      Specified by:
      metricEgressBytes in interface IChannel
    • metricEgressRequestCount

      @Stability(Experimental) @NotNull public Metric metricEgressRequestCount(@Nullable MetricOptions options)
      (experimental) Returns Metric for Egress Request Count.

      Default: - sum over 60 seconds

      Specified by:
      metricEgressRequestCount in interface IChannel
      Parameters:
      options -
    • metricEgressRequestCount

      @Stability(Experimental) @NotNull public Metric metricEgressRequestCount()
      (experimental) Returns Metric for Egress Request Count.

      Default: - sum over 60 seconds

      Specified by:
      metricEgressRequestCount in interface IChannel
    • metricEgressResponseTime

      @Stability(Experimental) @NotNull public Metric metricEgressResponseTime(@Nullable MetricOptions options)
      (experimental) Returns Metric for Egress Response time.

      Default: - average over 60 seconds

      Specified by:
      metricEgressResponseTime in interface IChannel
      Parameters:
      options -
    • metricEgressResponseTime

      @Stability(Experimental) @NotNull public Metric metricEgressResponseTime()
      (experimental) Returns Metric for Egress Response time.

      Default: - average over 60 seconds

      Specified by:
      metricEgressResponseTime in interface IChannel
    • metricIngressBytes

      @Stability(Experimental) @NotNull public Metric metricIngressBytes(@Nullable MetricOptions options)
      (experimental) Returns Metric for Ingress Bytes.

      Default: - sum over 60 seconds

      Specified by:
      metricIngressBytes in interface IChannel
      Parameters:
      options -
    • metricIngressBytes

      @Stability(Experimental) @NotNull public Metric metricIngressBytes()
      (experimental) Returns Metric for Ingress Bytes.

      Default: - sum over 60 seconds

      Specified by:
      metricIngressBytes in interface IChannel
    • metricIngressRequestCount

      @Stability(Experimental) @NotNull public Metric metricIngressRequestCount(@Nullable MetricOptions options)
      (experimental) Returns Metric for Ingress Request Count.

      Default: - sum over 60 seconds

      Specified by:
      metricIngressRequestCount in interface IChannel
      Parameters:
      options -
    • metricIngressRequestCount

      @Stability(Experimental) @NotNull public Metric metricIngressRequestCount()
      (experimental) Returns Metric for Ingress Request Count.

      Default: - sum over 60 seconds

      Specified by:
      metricIngressRequestCount in interface IChannel
    • metricIngressResponseTime

      @Stability(Experimental) @NotNull public Metric metricIngressResponseTime(@Nullable MetricOptions options)
      (experimental) Returns Metric for Ingress response time.

      Default: - average over 60 seconds

      Specified by:
      metricIngressResponseTime in interface IChannel
      Parameters:
      options -
    • metricIngressResponseTime

      @Stability(Experimental) @NotNull public Metric metricIngressResponseTime()
      (experimental) Returns Metric for Ingress response time.

      Default: - average over 60 seconds

      Specified by:
      metricIngressResponseTime in interface IChannel
    • getChannelArn

      @Stability(Experimental) @NotNull public String getChannelArn()
      (experimental) The Amazon Resource Name (ARN) associated with the resource.
      Specified by:
      getChannelArn in interface IChannel
    • getChannelGroupName

      @Stability(Experimental) @NotNull public String getChannelGroupName()
      (experimental) The name that describes the channel group.

      The name is the primary identifier for the channel group.

      Specified by:
      getChannelGroupName in interface IChannel
    • getChannelName

      @Stability(Experimental) @NotNull public String getChannelName()
      (experimental) The name that describes the channel.

      The name is the primary identifier for the channel.

      Specified by:
      getChannelName in interface IChannel
    • getChannelRef

      @Stability(Experimental) @NotNull public ChannelReference getChannelRef()
      (experimental) A reference to this Channel resource.
      Specified by:
      getChannelRef in interface IChannelRef
    • getGrants

      @Stability(Experimental) @NotNull public ChannelGrants getGrants()
      (experimental) Collection of grant methods for this channel.
      Specified by:
      getGrants in interface IChannel
    • getIngestEndpointUrls

      @Stability(Experimental) @NotNull public List<String> getIngestEndpointUrls()
      (experimental) The list of ingest endpoints.
      Specified by:
      getIngestEndpointUrls in interface IChannel
    • getChannelGroup

      @Stability(Experimental) @Nullable public IChannelGroup getChannelGroup()
      (experimental) The channel group this channel belongs to.

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

      Specified by:
      getChannelGroup in interface IChannel
    • getCreatedAt

      @Stability(Experimental) @Nullable public String getCreatedAt()
      (experimental) The date and time the channel was created.
      Specified by:
      getCreatedAt in interface IChannel
    • getModifiedAt

      @Stability(Experimental) @Nullable public String getModifiedAt()
      (experimental) The date and time the channel was modified.
      Specified by:
      getModifiedAt in interface IChannel
    • getAutoCreatePolicy

      @Stability(Experimental) @NotNull protected Boolean getAutoCreatePolicy()
      (experimental) Indicates if a channel resource policy should automatically created upon the first call to addToResourcePolicy.
    • setAutoCreatePolicy

      @Stability(Experimental) protected void setAutoCreatePolicy(@NotNull Boolean value)
      (experimental) Indicates if a channel resource policy should automatically created upon the first call to addToResourcePolicy.
    • getPolicy

      @Stability(Experimental) @Nullable public ChannelPolicy getPolicy()
      (experimental) The resource policy associated with this channel.

      If autoCreatePolicy is true, a ChannelPolicy will be created upon the first call to addToResourcePolicy(s).

    • setPolicy

      @Stability(Experimental) public void setPolicy(@Nullable ChannelPolicy value)
      (experimental) The resource policy associated with this channel.

      If autoCreatePolicy is true, a ChannelPolicy will be created upon the first call to addToResourcePolicy(s).