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.133.0 (build 0f43e37)", date="2026-07-02T13:33:03.718Z") @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();
 
  • 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.