AWS Elemental MediaPackage 事件 - AWS Elemental MediaPackage

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

AWS Elemental MediaPackage 事件

AWS Elemental MediaPackage 與 Amazon E CloudWatch vents 整合,以通知您某些會影響通道和端點的事件。每個事件都以 JSON(JavaScript Object Topic) 表示,其中包含事件名稱、事件發生的日期和時間、受影響的通道或端點等等。 MediaPackage 在最大努力的基礎上發出事件。您可以使用 CloudWatch 事件來收集這些事件,並設定將事件路由到一或多個目標的規則,例如 AWS Lambda 函數、亞馬遜SNS主題、Amazon SQS 佇列、Amazon Kinesis 資料串流中的串流或內建目標。

如需將 CloudWatch 事件與其他類型事件搭配使用的詳細資訊,請參閱 Amazon CloudWatch 事件使用者指南

下列主題說明建 MediaPackage 立的 CloudWatch 事件。

輸入通知事件

您會收到即時和視訊點播 (VOD) 內容的輸入通知事件。這些事件會在 MediaPackage 擷取發生問題時通知您。以下是您可能會收到的輸入通知事件:

  • 超過最大輸入串流

  • 輸入切換

  • VOD擷取狀態變更

  • VOD播放準備

下列各節描述其中每一個事件。

超過最大輸入串流事件

對於即時內容,中的頻道 MediaPackage 超過輸入串流數目的配額。如需配額的詳細資訊,請參閱 配額 AWS Elemental MediaPackage

範例
{ "id": "7bf73129-1428-4cd3-a780-95db273d1602", "detail-type": "MediaPackage Input Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2015-11-11T21:29:54Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage:us-west-2:aws_account_id:channels/262ff182d46d4b399fcabea1364df682" ], "detail":{ "event": "MaxIngestStreamsError", "message": "Parent Manifest [%s] has [23] streams, more than [20] allowed: (index_1.m3u8,index_2.m3u8,index_3.m3u8,index_4.m3u8,index_5.m3u8,index_6.m3u8,index_7.m3u8,index_8.m3u8,index_9.m3u8,index_10.m3u8,index_11.m3u8,index_12.m3u8,index_13.m3u8,index_14.m3u8,index_15.m3u8,index_16.m3u8,index_17.m3u8,index_18.m3u8,index_19.m3u8,index_20.m3u8,index_21.m3u8,index_22.m3u8,index_23.m3u8)" } }
輸入切換事件

對於即時內容,請 MediaPackage 切換其中一個端點的輸入。

一個事件會隔 5 分鐘傳送一次。如果輸入在五分鐘內切換多次(例如,如果 MediaPackage 切換到一個輸入,然後切換回另一個輸入),則您只會收到一個事件。

如需有關輸入備援和造成輸入切換原因的資訊,請參閱 即時輸入備援AWS Elemental MediaPackage處理流程

範例
{ "id": "8f9b8e72-0b31-e883-f19c-aec84742f3ce", "detail-type": "MediaPackage Input Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2018-07-16T17:29:36Z", "region": "us-east-1", "resources":[ "arn:aws:mediapackage:us-east-1:aws_account_id:origin_endpoints/82d6b9bc04cb4612b487963d6c8d0f1a" ], "detail":{ "event": "InputSwitchEvent", "message": "Origin endpoint experienced an Input Switch Event", "EventDetails": { "Channel": "channel name", "PreviousIngestEndpoint": "endpoint uuid before input switch", "CurrentIngestEndpoint": "endpoint uuid after input switch", } } }
VOD擷取狀態事件

對於隨選視訊 (VOD) 內容,中的資產會 MediaPackage 變更擷取狀態。您收到下列事件的通知:

  • IngestStart

  • IngestError

  • IngestComplete

範例
{ "id": "8f9b8e72-0b31-e883-f19c-aec84742f3ce", "detail-type": "MediaPackage Input Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2019-05-03T17:29:36Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage-vod:us-west-2:aws_account_id:assets/asset_name" ], "detail":{ "event": "IngestComplete", "message": "message text" } }
VOD播放事件

對於VOD內容,中 MediaPackage 的資產可供播放。資產擷取完成到可播放資產有一段時間。此事件VodAssetPlayable表示現在 MediaPackage 可以滿足資產的播放要求。

您可以針對封裝群組中的每個封裝組態取得個別VodAssetPlayable事件。例如,如果您的封裝群組包含一個DASH和一個HLS封裝組態,您會收到兩個VodAssetPlayable事件 — 一個用於DASH封裝組態,另一個用於封裝HLS組態。

範例
{ "id": "81e896e4-d9e5-ec79-f82a-b4cf3246c567", "detail-type": "MediaPackage Input Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2019-11-03T21:46:00Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage-vod:us-west-2:aws_account_id:assets/asset_id", "arn:aws:mediapackage-vod:us-west-2:aws_account_id:packaging_configuration/packaging_configuration_id" ], "detail":{ "event": "VodAssetPlayable", "message": "Asset 'asset_id' is now playable for PackagingConfiguration 'packaging_configuration_id'", "packaging_configuration_id": "packaging_configuration_id", "manifest_urls":[ "https://555555555555.egress.mediapackage-vod.us-west-2.amazonaws.com/out/v1/b9cc115bf7f1a/b848dfb116920772aa69ba/a3c74b1cae6a451c/index.m3u8" ] } } { "id": "91e896e4-d9e5-ab80-f82a-b4cf3246c568", "detail-type": "MediaPackage Input Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2019-11-03T21:47:00Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage-vod:us-west-2:aws_account_id:assets/asset_id", "arn:aws:mediapackage-vod:us-west-2:aws_account_id:packaging_configuration/packaging_configuration_id" ], "detail":{ "event": "VodAssetPlayable", "message": "Asset 'asset_id' is now playable for PackagingConfiguration 'packaging_configuration_id'", "packaging_configuration_id": "packaging_configuration_id", "manifest_urls":[ "https://111122223333.egress.mediapackage-vod.us-west-2.amazonaws.com/out/v1/1234567890abc/021345abcdef6789012345/abcdef0123456789/index.mpd" ] } }

金鑰提供者通知事件

當您在端點上使用內容加密且 MediaPackage 無法連絡金鑰提供者時,您會收到金鑰提供者通知事件。若要取得有關DRM和加密的資訊,請參閱https://docs.aws.amazon.com/speke/latest/documentation/

範例 即時金鑰提供者通知事件
{ "id": "7bf73129-1428-4cd3-a780-98ds273d1602", "detail-type": "MediaPackage Key Provider Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2015-11-11T21:29:54Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage:us-west-2:aws_account_id:origin_endpoints/endpoint_id" ], "detail":{ "event": "KeyProviderError", "message": "message-text" } }
範例 VOD金鑰提供者通知事件
{ "id": "7bf73129-1428-4cd3-a780-98ds273d1602", "detail-type": "MediaPackage Key Provider Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2015-11-11T21:29:54Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage-vod:us-west-2:aws_account_id:packaging_configurations/packaging_group_name" ], "detail":{ "event": "KeyProviderError", "message": "message-text" } }

收集工作通知事件

當您從即時串流匯出剪輯片段以建立即時資產時,您會收到收割工作狀態事件。VOD MediaPackage 在收割工作成功或失敗時建立通知。有關收穫工作和生活VOD資產的信息,請參閱。使用建立即時視訊點播資產 AWS Elemental MediaPackage

範例 成功收穫工作活動
{ "id": "8f9b8e72-0b31-e883-f19c-aec84742f3ce", "detail-type": "MediaPackage HarvestJob Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2019-07-16T17:29:36Z", "region": "us-east-1", "resources":[ "arn:aws:mediapackage:us-east-1:aws_account_id:harvest_jobs/harvest_job_id" ], "detail":{ "harvest_job": { "id": "harvest_job_id", "arn": "arn:aws:mediapackage-vod:us-east-1:aws_account_id:harvest_jobs/harvest_job_id", "status": "SUCCEEDED", "origin_endpoint_id": "endpoint_id", "start_time": "2019-06-26T20:30:00-08:00", "end_time": "2019-06-26T21:00:00-08:00", "s3_destination": { "bucket_name": "s3_bucket_name", "manifest_key": "path/and/manifest_name/index.m3u8", "role_arn": "arn:aws:iam::aws_account_id:role/S3Access_role", }, "created_at": "2019-06-26T21:03:12-08:00" } } }
範例 失敗的收穫工作事件
{ "id": "8f9b8e72-0b31-e883-f19c-aec84742f3ce", "detail-type": "MediaPackage HarvestJob Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2019-07-16T17:29:36Z", "region": "us-east-1", "resources":[ "arn:aws:mediapackage:us-east-1:aws_account_id:harvest_jobs/harvest_job_id" ], "detail":{ "harvest_job": { "id": "harvest_job_id", "arn": "arn:aws:mediapackage-vod:us-east-1:aws_account_id:harvest_jobs/harvest_job_id", "status": "FAILED", "origin_endpoint_id": "endpoint_id", "start_time": "2019-06-26T20:30:00-08:00", "end_time": "2019-06-26T21:00:00-08:00", "s3_destination": { "bucket_name": "s3_bucket_name", "manifest_key": "path/and/manifest_name/index.m3u8", "role_arn": "arn:aws:iam::aws_account_id:role/S3Access_role", }, "created_at": "2019-06-26T21:03:12-08:00" }, "message": "Message text" } }