create_channel
async
¶
create_channel(
channel_group_name: ResourceName,
channel_name: ResourceName,
*,
config_overrides: Optional[AsyncMediaPackageV2ClientConfig] = None,
client_token: Optional[IdempotencyToken] = None,
input_type: Optional[InputType] = None,
description: Optional[ResourceDescription] = None,
input_switch_configuration: Optional[InputSwitchConfiguration] = None,
output_header_configuration: Optional[OutputHeaderConfiguration] = None,
multiview_configuration: Optional[MultiviewConfiguration] = None,
output_locking_mode: Optional[OutputLockingMode] = None,
tags: Optional[TagMap] = None,
) -> CreateChannelResponse
Create a channel to start receiving content streams. The channel represents the input to MediaPackage for incoming live content from an encoder such as AWS Elemental MediaLive. The channel receives content, and after packaging it, outputs it through an origin endpoint to downstream devices (such as video players or CDNs) that request the content. You can create only one channel with each request. We recommend that you spread out channels between channel groups, such as putting redundant channels in the same AWS Region in different channel groups.
Parameters:
-
channel_group_name(ResourceName) –The 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_name(ResourceName) –The 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. You can't change the name after you create the channel.
-
client_token(Optional[IdempotencyToken], default:None) –A unique, case-sensitive token that you provide to ensure the idempotency of the request.
-
input_type(Optional[InputType], default:None) –The input type is an immutable field. It defines whether the channel allows CMAF ingest, HLS ingest, or server-side multiview output. Multiview channels receive no ingest of their own. If unprovided, the value defaults to HLS.
The allowed values are:
-
HLS- The HLS streaming specification (which defines M3U8 manifests and TS segments). -
CMAF- The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests). -
MULTIVIEW– Server-side multiview. The channel receives no ingest of its own. Instead, it composites video from the source channels in itsMultiviewConfigurationinto a single tiled output stream.
-
-
description(Optional[ResourceDescription], default:None) –Enter any descriptive text that helps you to identify the channel.
-
input_switch_configuration(Optional[InputSwitchConfiguration], default:None) –The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when
InputTypeisCMAF. -
output_header_configuration(Optional[OutputHeaderConfiguration], default:None) –The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when
InputTypeisCMAF. -
multiview_configuration(Optional[MultiviewConfiguration], default:None) –The multiview configuration for the channel. This setting is required when
InputTypeisMULTIVIEW, and can't be set for any other input type. -
output_locking_mode(Optional[OutputLockingMode], default:None) –The output locking mode for the channel. This setting is only valid when
InputTypeisCMAF. This value is immutable after channel creation. If you don't specify a value, the default isEPOCH_LOCKED.The allowed values are:
-
EPOCH_LOCKED- The channel uses epoch-locked behavior with deterministic sequence numbering and fixed segment boundaries aligned to epoch time. This mode supports cross-region synchronization and failover. -
NON_EPOCH_LOCKED- The channel uses non-epoch-locked behavior with duration-based segment combining and monotonically increasing sequence numbers starting from 0. This mode does not support cross-region synchronization or failover.
-
-
tags(Optional[TagMap], default:None) –A comma-separated list of tag key:value pairs that you define. For example:
"Key1": "Value1","Key2": "Value2"
Raises:
-
AccessDeniedException–Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.
-
ConflictException–Updating or deleting this resource can cause an inconsistent state.
-
InternalServerException–Indicates that an error from the service occurred while trying to process a request.
-
ResourceNotFoundException–The specified resource doesn't exist.
-
ServiceQuotaExceededException–The request would cause a service quota to be exceeded.
-
ThrottlingException–The request throughput limit was exceeded.
-
ValidationException–The input failed to meet the constraints specified by the AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Creating a Channel
>>> await client.create_channel(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', input_type='HLS', description='Description for exampleChannel', tags={'key1': 'value1', 'key2': 'value2'})
Creating a CMAF Channel with non-epoch-locked output locking mode
>>> await client.create_channel(channel_group_name='exampleChannelGroup', channel_name='exampleCmafChannel', input_type='CMAF', output_locking_mode='NON_EPOCH_LOCKED', description='Non-epoch-locked CMAF channel')
Source code in docs_src/capo_mediapackagev2/_services/async_media_package_v2.py
730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 | |