与 AWS SDK或ListOriginEndpoints一起使用 CLI - AWS SDK代码示例

AWS 文档 AWS SDK示例 GitHub 存储库中还有更多SDK示例

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

与 AWS SDK或ListOriginEndpoints一起使用 CLI

以下代码示例演示如何使用 ListOriginEndpoints

CLI
AWS CLI

列出通道上的所有源端点

以下 list-origin-endpoints 命令列出了名为 test 的通道中配置的所有源端点。

aws mediapackage list-origin-endpoints \ --channel-id test

输出:

{ "OriginEndpoints": [ { "Arn": "arn:aws:mediapackage:us-west-2:111222333:origin_endpoints/247cff871f2845d3805129be22f2c0a2", "ChannelId": "test", "DashPackage": { "ManifestLayout": "FULL", "ManifestWindowSeconds": 60, "MinBufferTimeSeconds": 30, "MinUpdatePeriodSeconds": 15, "PeriodTriggers": [], "Profile": "NONE", "SegmentDurationSeconds": 2, "SegmentTemplateFormat": "NUMBER_WITH_TIMELINE", "StreamSelection": { "MaxVideoBitsPerSecond": 2147483647, "MinVideoBitsPerSecond": 0, "StreamOrder": "ORIGINAL" }, "SuggestedPresentationDelaySeconds": 25 }, "Id": "tester2", "ManifestName": "index", "StartoverWindowSeconds": 0, "Tags": {}, "TimeDelaySeconds": 0, "Url": "https://8343f7014c0ea438.mediapackage.us-west-2.amazonaws.com/out/v1/247cff871f2845d3805129be22f2c0a2/index.mpd", "Whitelist": [] }, { "Arn": "arn:aws:mediapackage:us-west-2:111222333:origin_endpoints/869e237f851549e9bcf10e3bc2830839", "ChannelId": "test", "HlsPackage": { "AdMarkers": "NONE", "IncludeIframeOnlyStream": false, "PlaylistType": "EVENT", "PlaylistWindowSeconds": 60, "ProgramDateTimeIntervalSeconds": 0, "SegmentDurationSeconds": 6, "StreamSelection": { "MaxVideoBitsPerSecond": 2147483647, "MinVideoBitsPerSecond": 0, "StreamOrder": "ORIGINAL" }, "UseAudioRenditionGroup": false }, "Id": "tester", "ManifestName": "index", "StartoverWindowSeconds": 0, "Tags": {}, "TimeDelaySeconds": 0, "Url": "https://8343f7014c0ea438.mediapackage.us-west-2.amazonaws.com/out/v1/869e237f851549e9bcf10e3bc2830839/index.m3u8", "Whitelist": [] } ] }

有关更多信息,请参阅 AWS Elemental MediaPackage 用户指南中的查看与频道关联的所有端点

Rust
SDK对于 Rust
注意

还有更多相关信息 GitHub。查找完整示例,学习如何在 AWS 代码示例存储库中进行设置和运行。

列出您的端点描述和URLs.

async fn show_endpoints(client: &Client) -> Result<(), Error> { let or_endpoints = client.list_origin_endpoints().send().await?; println!("Endpoints:"); for e in or_endpoints.origin_endpoints() { let endpoint_url = e.url().unwrap_or_default(); let endpoint_description = e.description().unwrap_or_default(); println!(" Description: {}", endpoint_description); println!(" URL : {}", endpoint_url); println!(); } Ok(()) }