Weitere AWS SDK-Beispiele sind im Repo AWS Doc SDK Examples
Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.
MediaTailor Beispiele mit AWS CLI
Die folgenden Codebeispiele zeigen Ihnen, wie Sie mithilfe von AWS Command Line Interface with Aktionen ausführen und allgemeine Szenarien implementieren MediaTailor.
Aktionen sind Codeauszüge aus größeren Programmen und müssen im Kontext ausgeführt werden. Während Aktionen Ihnen zeigen, wie Sie einzelne Service-Funktionen aufrufen, können Sie Aktionen im Kontext der zugehörigen Szenarios anzeigen.
Jedes Beispiel enthält einen Link zum vollständigen Quellcode, in dem Sie Anweisungen zum Einrichten und Ausführen des Codes im Kontext finden.
Themen
Aktionen
Das folgende Codebeispiel zeigt die Verwendungdelete-playback-configuration.
- AWS CLI
-
So löschen Sie eine Konfiguration
Im Folgenden wird eine Konfiguration mit dem Namen
delete-playback-configurationcampaign_shortgelöscht.aws mediatailor delete-playback-configuration \ --namecampaign_shortMit diesem Befehl wird keine Ausgabe zurückgegeben.
Weitere Informationen finden Sie unter Löschen einer Konfiguration im AWS Elemental MediaTailor User Guide.
-
Einzelheiten zur API finden Sie unter DeletePlaybackConfiguration AWS CLI
Befehlsreferenz.
-
Das folgende Codebeispiel zeigt die Verwendungget-playback-configuration.
- AWS CLI
-
Um eine Konfiguration zu beschreiben
Im Folgenden
get-playback-configurationwerden alle Details der genannten Konfiguration angezeigtwest_campaign.aws mediatailor get-playback-configuration \ --namewest_campaignAusgabe:
{ "AdDecisionServerUrl": "http://your.ads.url", "CdnConfiguration": {}, "DashConfiguration": { "ManifestEndpointPrefix": "https://170c14299689462897d0cc45fc2000bb.mediatailor.us-west-2.amazonaws.com/v1/dash/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/west_campaign/", "MpdLocation": "EMT_DEFAULT", "OriginManifestType": "MULTI_PERIOD" }, "HlsConfiguration": { "ManifestEndpointPrefix": "https://170c14299689462897d0cc45fc2000bb.mediatailor.us-west-2.amazonaws.com/v1/master/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/west_campaign/" }, "Name": "west_campaign", "PlaybackConfigurationArn": "arn:aws:mediatailor:us-west-2:123456789012:playbackConfiguration/west_campaign", "PlaybackEndpointPrefix": "https://170c14299689462897d0cc45fc2000bb.mediatailor.us-west-2.amazonaws.com", "SessionInitializationEndpointPrefix": "https://170c14299689462897d0cc45fc2000bb.mediatailor.us-west-2.amazonaws.com/v1/session/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/west_campaign/", "Tags": {}, "VideoContentSourceUrl": "https://8343f7014c0ea438.mediapackage.us-west-2.amazonaws.com/out/v1/683f0f2ff7cd43a48902e6dcd5e16dcf/index.m3u8" }Weitere Informationen finden Sie unter Konfiguration anzeigen im AWS Elemental MediaTailor User Guide.
-
Einzelheiten zur API finden Sie unter GetPlaybackConfiguration AWS CLI
Befehlsreferenz.
-
Das folgende Codebeispiel zeigt die Verwendunglist-playback-configurations.
- AWS CLI
-
Um alle Konfigurationen aufzulisten
Im Folgenden
list-playback-configurationswerden alle Details der Konfiguration des aktuellen AWS Kontos angezeigt.aws mediatailor list-playback-configurationsAusgabe:
{ "Items": [ { "AdDecisionServerUrl": "http://your.ads.url", "CdnConfiguration": {}, "DashConfiguration": { "ManifestEndpointPrefix": "https://170c14299689462897d0cc45fc2000bb.mediatailor.us-west-2.amazonaws.com/v1/dash/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/west_campaign/", "MpdLocation": "EMT_DEFAULT", "OriginManifestType": "MULTI_PERIOD" }, "HlsConfiguration": { "ManifestEndpointPrefix": "https://170c14299689462897d0cc45fc2000bb.mediatailor.us-west-2.amazonaws.com/v1/master/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/west_campaign/" }, "Name": "west_campaign", "PlaybackConfigurationArn": "arn:aws:mediatailor:us-west-2:123456789012:playbackConfiguration/west_campaign", "PlaybackEndpointPrefix": "https://170c14299689462897d0cc45fc2000bb.mediatailor.us-west-2.amazonaws.com", "SessionInitializationEndpointPrefix": "https://170c14299689462897d0cc45fc2000bb.mediatailor.us-west-2.amazonaws.com/v1/session/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/west_campaign/", "Tags": {}, "VideoContentSourceUrl": "https://8343f7014c0ea438.mediapackage.us-west-2.amazonaws.com/out/v1/683f0f2ff7cd43a48902e6dcd5e16dcf/index.m3u8" }, { "AdDecisionServerUrl": "http://your.ads.url", "CdnConfiguration": {}, "DashConfiguration": { "ManifestEndpointPrefix": "https://73511f91d6a24ca2b93f3cf1d7cedd67.mediatailor.us-west-2.amazonaws.com/v1/dash/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/sports_campaign/", "MpdLocation": "DISABLED", "OriginManifestType": "MULTI_PERIOD" }, "HlsConfiguration": { "ManifestEndpointPrefix": "https://73511f91d6a24ca2b93f3cf1d7cedd67.mediatailor.us-west-2.amazonaws.com/v1/master/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/sports_campaign/" }, "Name": "sports_campaign", "PlaybackConfigurationArn": "arn:aws:mediatailor:us-west-2:123456789012:playbackConfiguration/sports_campaign", "PlaybackEndpointPrefix": "https://73511f91d6a24ca2b93f3cf1d7cedd67.mediatailor.us-west-2.amazonaws.com", "SessionInitializationEndpointPrefix": "https://73511f91d6a24ca2b93f3cf1d7cedd67.mediatailor.us-west-2.amazonaws.com/v1/session/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/sports_campaign/", "SlateAdUrl": "http://s3.bucket/slate_ad.mp4", "Tags": {}, "VideoContentSourceUrl": "https://c4af3793bf76b33c.mediapackage.us-west-2.amazonaws.com/out/v1/1dc6718be36f4f34bb9cd86bc50925e6/sports_endpoint/index.m3u8" } ] }Weitere Informationen finden Sie unter Konfiguration anzeigen< https://docs.aws.amazon.com/mediatailor/ latest/ug/configurations -view.html> im Elemental User Guide.AWS MediaTailor
-
Einzelheiten zur API finden Sie in der Befehlsreferenz. ListPlaybackConfigurations
AWS CLI
-
Das folgende Codebeispiel zeigt die Verwendungput-playback-configuration.
- AWS CLI
-
Um eine Konfiguration zu erstellen
Im Folgenden
put-playback-configurationwird eine Konfiguration mit dem Namen erstelltcampaign_short.aws mediatailor put-playback-configuration \ --namecampaign_short\ --ad-decision-server-urlhttp://your.ads.url\ --video-content-source-urlhttp://video.bucket/index.m3u8Ausgabe:
{ "AdDecisionServerUrl": "http://your.ads.url", "CdnConfiguration": {}, "DashConfiguration": { "ManifestEndpointPrefix": "https://13484114d38f4383bc0d6a7cb879bd00.mediatailor.us-west-2.amazonaws.com/v1/dash/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/campaign_short/", "MpdLocation": "EMT_DEFAULT", "OriginManifestType": "MULTI_PERIOD" }, "HlsConfiguration": { "ManifestEndpointPrefix": "https://13484114d38f4383bc0d6a7cb879bd00.mediatailor.us-west-2.amazonaws.com/v1/master/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/campaign_short/" }, "Name": "campaign_short", "PlaybackConfigurationArn": "arn:aws:mediatailor:us-west-2:123456789012:playbackConfiguration/campaign_short", "PlaybackEndpointPrefix": "https://13484114d38f4383bc0d6a7cb879bd00.mediatailor.us-west-2.amazonaws.com", "SessionInitializationEndpointPrefix": "https://13484114d38f4383bc0d6a7cb879bd00.mediatailor.us-west-2.amazonaws.com/v1/session/1cbfeaaecb69778e0c167d0505a2bc57da2b1754/campaign_short/", "Tags": {}, "VideoContentSourceUrl": "http://video.bucket/index.m3u8" }Weitere Informationen finden Sie unter Creating a Configuration im AWS Elemental MediaTailor User Guide.
-
Einzelheiten zur API finden Sie unter PutPlaybackConfiguration AWS CLI
Befehlsreferenz.
-