> **Experimental**
>
> `@aws-cdk/aws-mediaconnect-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# FlowEntitlement

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.

Extends: Construct › Resource › FlowEntitlement
Implements: IFlowEntitlement, IResource, IEnvironmentAware, IFlowEntitlementRef, IConstruct, IDependable

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/flow-entitlement.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-mediaconnect-alpha/lib/flow-entitlement.ts#L104)

## Example

```ts
declare const stack: Stack;
declare const flow: Flow;
declare const role: iam.IRole;
declare const secret: secretsmanager.ISecret;

new FlowEntitlement(stack, 'MyEntitlement', {
  flow,
  subscribers: ['111122223333'],
  description: 'Grant partner access to live feed',
  encryption: {
    role,
    secret,
    algorithm: EncryptionAlgorithm.AES256,
  },
});
```

## Initializer

```ts
new FlowEntitlement(scope: Construct, id: string, props: FlowEntitlementProps)
```

## Construct Props

- `dataTransferSubscriberFeePercent`: number — The percentage of the entitlement data transfer fee that you want the subscriber to be responsible for.

  **Default:** the MediaConnect service default

- `description`: string (required) — A description of the entitlement.

  This description appears only on the MediaConnect console
  and is not visible outside of the current AWS account.

- `encryption`: [StaticKeyEncryption](/cdk/api/v2/docs/@aws-cdk_aws-mediaconnect-alpha.StaticKeyEncryption.html) — Options for encrypting the entitlement.

  **Default:** no encryption

  Only static key encryption is supported for entitlements.

- `entitlementStatus`: [EntitlementStatus](/cdk/api/v2/docs/@aws-cdk_aws-mediaconnect-alpha.EntitlementStatus.html) — 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`: [IFlow](/cdk/api/v2/docs/@aws-cdk_aws-mediaconnect-alpha.IFlow.html) (required) — The flow to set the entitlement from.

- `flowEntitlementName`: string = autogenerated — The name of the entitlement.

  This value must be unique within the current flow.

- `subscribers`: string[] (required) — 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.

## Properties

- `entitlementArn`: string — The Amazon Resource Name (ARN) of the entitlement.

- `env`: [ResourceEnvironment](/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — 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.

- `flowEntitlementRef`: [FlowEntitlementReference](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_mediaconnect.FlowEntitlementReference.html) — A reference to a FlowEntitlement resource.

- `node`: [Node](/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `PROPERTY_INJECTION_ID`: string (static) — Uniquely identifies this class.

- `stack`: [Stack](/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this resource is defined.

## Methods

- `applyCrossStackReferenceStrength(strength: ReferenceStrength): void` — 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` — - The reference strength to use for this resource.

- `applyRemovalPolicy(policy: RemovalPolicy): void` — 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`).

- `fromFlowEntitlementArn(scope: Construct, id: string, flowEntitlementArn: string): IFlowEntitlement` (static) — Creates a FlowEntitlement construct that represents an external (imported) FlowEntitlement.

- `isConstruct(x: any): boolean` (static) — 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 object.

  **Returns:** true if `x` is an object created from a class which extends `Construct`.

- `isOwnedResource(construct: IConstruct): boolean` (static) — Returns true if the construct was created by CDK, and false otherwise.

- `isResource(construct: IConstruct): boolean` (static) — Check whether the given construct is a Resource.

- `toString(): string` — Returns a string representation of this construct.

- `with(...mixins: IMixin[]): IConstruct` — 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.
