channel_policies
Creates, updates, deletes or gets a channel_policy
resource or lists channel_policies
in a region
Overview
Name | channel_policies |
Type | Resource |
Description | Definition of AWS::MediaTailor::ChannelPolicy Resource Type |
Id | aws.mediatailor.channel_policies |
Fields
Name | Datatype | Description |
---|---|---|
channel_name | string | |
policy | object | The IAM policy for the channel. IAM policies are used to control access to your channel. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ChannelName, Policy, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all properties from an individual channel_policy
.
SELECT
region,
channel_name,
policy
FROM aws.mediatailor.channel_policies
WHERE region = 'us-east-1' AND data__Identifier = '<ChannelName>';
INSERT
example
Use the following StackQL query and manifest file to create a new channel_policy
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.mediatailor.channel_policies (
ChannelName,
Policy,
region
)
SELECT
'{{ ChannelName }}',
'{{ Policy }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.mediatailor.channel_policies (
ChannelName,
Policy,
region
)
SELECT
'{{ ChannelName }}',
'{{ Policy }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: channel_policy
props:
- name: ChannelName
value: '{{ ChannelName }}'
- name: Policy
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.mediatailor.channel_policies
WHERE data__Identifier = '<ChannelName>'
AND region = 'us-east-1';
Permissions
To operate on the channel_policies
resource, the following permissions are required:
Create
mediatailor:PutChannelPolicy,
mediatailor:GetChannelPolicy
Read
mediatailor:GetChannelPolicy
Update
mediatailor:PutChannelPolicy,
mediatailor:GetChannelPolicy
Delete
mediatailor:DeleteChannelPolicy,
mediatailor:GetChannelPolicy