channels
Creates, updates, deletes or gets a channel resource or lists channels in a region
Overview
| Name | channels |
| Type | Resource |
| Description | Resource schema for AWS::MediaPackage::Channel |
| Id | awscc.mediapackage.channels |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) assigned to the Channel. |
id | string | The ID of the Channel. |
description | string | A short text description of the Channel. |
hls_ingest | object | An HTTP Live Streaming (HLS) ingest resource configuration. |
tags | array | A collection of tags associated with a resource |
egress_access_logs | object | The configuration parameters for egress access logging. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the Channel. |
region | string | AWS region. |
For more information, see AWS::MediaPackage::Channel.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | channels | INSERT | Id, region |
delete_resource | channels | DELETE | Identifier, region |
update_resource | channels | UPDATE | Identifier, PatchDocument, region |
list_resources | channels_list_only | SELECT | region |
get_resource | channels | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual channel.
SELECT
region,
arn,
id,
description,
hls_ingest,
tags,
egress_access_logs,
ingress_access_logs
FROM awscc.mediapackage.channels
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all channels in a region.
SELECT
region,
id
FROM awscc.mediapackage.channels_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new channel resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.mediapackage.channels (
Id,
region
)
SELECT
'{{ id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.mediapackage.channels (
Id,
Description,
HlsIngest,
Tags,
EgressAccessLogs,
IngressAccessLogs,
region
)
SELECT
'{{ id }}',
'{{ description }}',
'{{ hls_ingest }}',
'{{ tags }}',
'{{ egress_access_logs }}',
'{{ ingress_access_logs }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: channel
props:
- name: id
value: '{{ id }}'
- name: description
value: '{{ description }}'
- name: hls_ingest
value:
ingest_endpoints:
- id: '{{ id }}'
username: '{{ username }}'
password: '{{ password }}'
url: '{{ url }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: egress_access_logs
value:
log_group_name: '{{ log_group_name }}'
- name: ingress_access_logs
value: null
UPDATE example
Use the following StackQL query and manifest file to update a channel resource, using stack-deploy.
/*+ update */
UPDATE awscc.mediapackage.channels
SET PatchDocument = string('{{ {
"Description": description,
"EgressAccessLogs": egress_access_logs,
"IngressAccessLogs": ingress_access_logs
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.mediapackage.channels
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the channels resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
mediapackage:CreateChannel,
mediapackage:DescribeChannel,
mediapackage:UpdateChannel,
mediapackage:TagResource,
mediapackage:ConfigureLogs,
iam:CreateServiceLinkedRole
mediapackage:DescribeChannel
mediapackage:UpdateChannel,
mediapackage:ConfigureLogs,
iam:CreateServiceLinkedRole
mediapackage:DeleteChannel
mediapackage:ListChannels