FlowEntitlement

class aws_cdk.aws_mediaconnect_alpha.FlowEntitlement(scope, id, *, description, flow, subscribers, data_transfer_subscriber_fee_percent=None, encryption=None, entitlement_status=None, flow_entitlement_name=None)

Bases: Resource

(experimental) Resource defines the permission that an AWS account grants to another AWS account to allow access to the content in a specific AWS Elemental MediaConnect flow.

Stability:

experimental

ExampleMetadata:

infused

Example:

from aws_cdk.aws_mediaconnect_alpha import StaticKeyEncryption
# stack: Stack
# flow: Flow
# role: iam.IRole
# secret: secretsmanager.ISecret


FlowEntitlement(stack, "MyEntitlement",
    flow=flow,
    subscribers=["111122223333"],
    description="Grant partner access to live feed",
    encryption=StaticKeyEncryption(
        role=role,
        secret=secret,
        algorithm=EncryptionAlgorithm.AES256
    )
)
Parameters:
  • scope (Construct)

  • id (str)

  • description (str) – (experimental) A description of the entitlement. This description appears only on the MediaConnect console and is not visible outside of the current AWS account.

  • flow (IFlow) – (experimental) The flow to set the entitlement from.

  • subscribers (Sequence[str]) – (experimental) The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flows using your content as the source.

  • data_transfer_subscriber_fee_percent (Union[int, float, None]) – (experimental) The percentage of the entitlement data transfer fee that you want the subscriber to be responsible for. Default: - the MediaConnect service default

  • encryption (Union[StaticKeyEncryption, Dict[str, Any], None]) – (experimental) Options for encrypting the entitlement. Only static key encryption is supported for entitlements. Default: - no encryption

  • entitlement_status (Optional[EntitlementStatus]) – (experimental) An indication of whether the new entitlement should be enabled or disabled as soon as it is created. Default: - undefined; when omitted, MediaConnect enables the entitlement (ENABLED) at deploy time

  • flow_entitlement_name (Optional[str]) – (experimental) The name of the entitlement. This value must be unique within the current flow. Default: autogenerated

Stability:

experimental

Methods

apply_cross_stack_reference_strength(strength)

Override the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the “deadly embrace” problem without changing the app-wide default.

Parameters:

strength (ReferenceStrength) –

  • The reference strength to use for this resource.

Return type:

None

apply_removal_policy(policy)

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).

Parameters:

policy (RemovalPolicy)

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

with_(*mixins)

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. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

mixins (IMixin)

Return type:

IConstruct

Attributes

PROPERTY_INJECTION_ID = '@aws-cdk.aws-mediaconnect-alpha.FlowEntitlement'
entitlement_arn

(experimental) The Amazon Resource Name (ARN) of the entitlement.

Stability:

experimental

env

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.

flow_entitlement_ref

(experimental) A reference to a FlowEntitlement resource.

Stability:

experimental

node

The tree node.

stack

The stack in which this resource is defined.

Static Methods

classmethod from_flow_entitlement_arn(scope, id, flow_entitlement_arn)

(experimental) Creates a FlowEntitlement construct that represents an external (imported) FlowEntitlement.

Parameters:
  • scope (Construct)

  • id (str)

  • flow_entitlement_arn (str)

Stability:

experimental

Return type:

IFlowEntitlement

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

classmethod is_owned_resource(construct)

Returns true if the construct was created by CDK, and false otherwise.

Parameters:

construct (IConstruct)

Return type:

bool

classmethod is_resource(construct)

Check whether the given construct is a Resource.

Parameters:

construct (IConstruct)

Return type:

bool