Skip to main content

channel_policies

Creates, updates, deletes, gets or lists a channel_policies resource.

Overview

Namechannel_policies
TypeResource
Idaws.mediapackagev2.channel_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
channel_group_namestringThe name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.
channel_namestringThe name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.
policystringThe policy assigned to the channel.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_channel_policyselectchannel_group_name, channel_name, regionRetrieves the specified channel policy that's configured in AWS Elemental MediaPackage. With policies, you can specify who has access to AWS resources and what actions they can perform on those resources.
put_channel_policyreplacechannel_group_name, channel_name, regionAttaches an IAM policy to the specified channel. With policies, you can specify who has access to AWS resources and what actions they can perform on those resources. You can attach only one policy with each request.
delete_channel_policydeletechannel_group_name, channel_name, regionDelete a channel policy.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
channel_group_namestringThe name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.
channel_namestringThe name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves the specified channel policy that's configured in AWS Elemental MediaPackage. With policies, you can specify who has access to AWS resources and what actions they can perform on those resources.

SELECT
channel_group_name,
channel_name,
policy
FROM aws.mediapackagev2.channel_policies
WHERE channel_group_name = '{{ channel_group_name }}' -- required
AND channel_name = '{{ channel_name }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

Attaches an IAM policy to the specified channel. With policies, you can specify who has access to AWS resources and what actions they can perform on those resources. You can attach only one policy with each request.

REPLACE aws.mediapackagev2.channel_policies
SET
Policy = '{{ Policy }}'
WHERE
channel_group_name = '{{ channel_group_name }}' --required
AND channel_name = '{{ channel_name }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Delete a channel policy.

DELETE FROM aws.mediapackagev2.channel_policies
WHERE channel_group_name = '{{ channel_group_name }}' --required
AND channel_name = '{{ channel_name }}' --required
AND region = '{{ region }}' --required
;