Class ChannelPolicy
- All Implemented Interfaces:
IEnvironmentAware,IResource,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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 ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forChannelPolicy.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChannelPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedChannelPolicy(software.amazon.jsii.JsiiObjectRef objRef) ChannelPolicy(software.constructs.Construct scope, String id, ChannelPolicyProps props) -
Method Summary
Modifier and TypeMethodDescription(experimental) A policy document containing permissions to add to the specified channel.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource, withMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
(experimental) A policy document containing permissions to add to the specified channel.
-