java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.mediapackagev2.alpha.ChannelPolicy
All Implemented Interfaces:
IEnvironmentAware, IResource, 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.706Z") @Stability(Experimental) public class ChannelPolicy extends Resource
(experimental) The channel policy for an AWS Elemental MediaPackage V2 channel.

Policies define the operations that are allowed on this resource.

You almost never need to define this construct directly.

All AWS resources that support resource policies have a method called addToResourcePolicy(), which will automatically create a new resource policy if one doesn't exist yet, otherwise it will add to the existing policy.

The channel policy method is implemented differently than addToResourcePolicy() as ChannelPolicy creates a new policy without knowing one earlier existed. This will cause a resource conflict if both are invoked (or even multiple channel policies are defined), so care is to be taken to ensure only 1 channel policy is created per channel.

Hence it's strongly recommended to use addToResourcePolicy().

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.mediapackagev2.alpha.*;
 import software.amazon.awscdk.services.iam.*;
 Channel channel;
 PolicyDocument policyDocument;
 ChannelPolicy channelPolicy = ChannelPolicy.Builder.create(this, "MyChannelPolicy")
         .channel(channel)
         // the properties below are optional
         .policyDocument(policyDocument)
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    (experimental) A fluent builder for ChannelPolicy.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default

    Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource

    IResource.Jsii$Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    (experimental) Uniquely identifies this class.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ChannelPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    ChannelPolicy(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    ChannelPolicy(software.constructs.Construct scope, String id, ChannelPolicyProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (experimental) A policy document containing permissions to add to the specified channel.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.constructs.IConstruct

    getNode

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • PROPERTY_INJECTION_ID

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

    • ChannelPolicy

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

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

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

    • getDocument

      @Stability(Experimental) @NotNull public PolicyDocument getDocument()
      (experimental) A policy document containing permissions to add to the specified channel.