flow_entitlements
Creates, updates, deletes or gets a flow_entitlement resource or lists flow_entitlements in a region
Overview
| Name | flow_entitlements |
| Type | Resource |
| Description | Resource schema for AWS::MediaConnect::FlowEntitlement |
| Id | awscc.mediaconnect.flow_entitlements |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
flow_arn | string | The ARN of the flow. |
entitlement_arn | string | The ARN of the entitlement. |
data_transfer_subscriber_fee_percent | integer | Percentage from 0-100 of the data transfer cost to be billed to the subscriber. |
description | string | A description of the entitlement. |
encryption | object | The type of encryption that will be used on the output that is associated with this entitlement. |
entitlement_status | string | An indication of whether the entitlement is enabled. |
name | string | The name of the entitlement. |
subscribers | array | The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
entitlement_arn | string | The ARN of the entitlement. |
region | string | AWS region. |
For more information, see AWS::MediaConnect::FlowEntitlement.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | flow_entitlements | INSERT | FlowArn, Name, Subscribers, Description, region |
delete_resource | flow_entitlements | DELETE | Identifier, region |
update_resource | flow_entitlements | UPDATE | Identifier, PatchDocument, region |
list_resources | flow_entitlements_list_only | SELECT | region |
get_resource | flow_entitlements | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual flow_entitlement.
SELECT
region,
flow_arn,
entitlement_arn,
data_transfer_subscriber_fee_percent,
description,
encryption,
entitlement_status,
name,
subscribers
FROM awscc.mediaconnect.flow_entitlements
WHERE
region = '{{ region }}' AND
Identifier = '{{ entitlement_arn }}';
Lists all flow_entitlements in a region.
SELECT
region,
entitlement_arn
FROM awscc.mediaconnect.flow_entitlements_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new flow_entitlement resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.mediaconnect.flow_entitlements (
FlowArn,
Description,
Name,
Subscribers,
region
)
SELECT
'{{ flow_arn }}',
'{{ description }}',
'{{ name }}',
'{{ subscribers }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.mediaconnect.flow_entitlements (
FlowArn,
DataTransferSubscriberFeePercent,
Description,
Encryption,
EntitlementStatus,
Name,
Subscribers,
region
)
SELECT
'{{ flow_arn }}',
'{{ data_transfer_subscriber_fee_percent }}',
'{{ description }}',
'{{ encryption }}',
'{{ entitlement_status }}',
'{{ name }}',
'{{ subscribers }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: flow_entitlement
props:
- name: flow_arn
value: '{{ flow_arn }}'
- name: data_transfer_subscriber_fee_percent
value: '{{ data_transfer_subscriber_fee_percent }}'
- name: description
value: '{{ description }}'
- name: encryption
value:
algorithm: '{{ algorithm }}'
constant_initialization_vector: '{{ constant_initialization_vector }}'
device_id: '{{ device_id }}'
key_type: '{{ key_type }}'
region: '{{ region }}'
resource_id: '{{ resource_id }}'
role_arn: '{{ role_arn }}'
secret_arn: '{{ secret_arn }}'
url: '{{ url }}'
- name: entitlement_status
value: '{{ entitlement_status }}'
- name: name
value: '{{ name }}'
- name: subscribers
value:
- '{{ subscribers[0] }}'
UPDATE example
Use the following StackQL query and manifest file to update a flow_entitlement resource, using stack-deploy.
/*+ update */
UPDATE awscc.mediaconnect.flow_entitlements
SET PatchDocument = string('{{ {
"FlowArn": flow_arn,
"Description": description,
"Encryption": encryption,
"EntitlementStatus": entitlement_status,
"Subscribers": subscribers
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ entitlement_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.mediaconnect.flow_entitlements
WHERE
Identifier = '{{ entitlement_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the flow_entitlements resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iam:PassRole,
mediaconnect:GrantFlowEntitlements
mediaconnect:DescribeFlow
mediaconnect:DescribeFlow,
mediaconnect:UpdateFlowEntitlement
mediaconnect:DescribeFlow,
mediaconnect:RevokeFlowEntitlement
mediaconnect:DescribeFlow,
mediaconnect:ListFlows