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 | awscc.mediatailor.channel_policies |
Fields
| Name | Datatype | Description |
|---|---|---|
channel_name | string | |
policy | object | <p>The IAM policy for the channel. IAM policies are used to control access to your channel.</p> |
region | string | AWS region. |
For more information, see AWS::MediaTailor::ChannelPolicy.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | ChannelName, Policy, region |
delete_resource | DELETE | Identifier, region |
update_resource | UPDATE | Identifier, PatchDocument, region |
get_resource | SELECT | Identifier, region |
SELECT examples
Gets all properties from an individual channel_policy.
SELECT
region,
channel_name,
policy
FROM awscc.mediatailor.channel_policies
WHERE
region = 'us-east-1' AND
Identifier = '{{ channel_name }}';
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 awscc.mediatailor.channel_policies (
ChannelName,
Policy,
region
)
SELECT
'{{ channel_name }}',
'{{ policy }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.mediatailor.channel_policies (
ChannelName,
Policy,
region
)
SELECT
'{{ channel_name }}',
'{{ 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: channel_name
value: '{{ channel_name }}'
- name: policy
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a channel_policy resource, using stack-deploy.
/*+ update */
UPDATE awscc.mediatailor.channel_policies
SET PatchDocument = string('{{ {
"Policy": policy
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ channel_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.mediatailor.channel_policies
WHERE
Identifier = '{{ channel_name }}' AND
region = 'us-east-1';
Permissions
To operate on the channel_policies resource, the following permissions are required:
- Create
- Read
- Update
- Delete
mediatailor:PutChannelPolicy,
mediatailor:GetChannelPolicy
mediatailor:GetChannelPolicy
mediatailor:PutChannelPolicy,
mediatailor:GetChannelPolicy
mediatailor:DeleteChannelPolicy,
mediatailor:GetChannelPolicy