Table of Contents
A low-level client representing AWS MediaTailor:
import boto3
client = boto3.client('mediatailor')
These are the available methods:
Check if an operation can be paginated.
Deletes the playback configuration for the specified name.
See also: AWS API Documentation
Request Syntax
response = client.delete_playback_configuration(
Name='string'
)
[REQUIRED]
The identifier for the playback configuration.
{}
Response Structure
The request was successful and there is no content in the response.
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Returns the playback configuration for the specified name.
See also: AWS API Documentation
Request Syntax
response = client.get_playback_configuration(
Name='string'
)
[REQUIRED]
The identifier for the playback configuration.
{
'AdDecisionServerUrl': 'string',
'CdnConfiguration': {
'AdSegmentUrlPrefix': 'string',
'ContentSegmentUrlPrefix': 'string'
},
'DashConfiguration': {
'ManifestEndpointPrefix': 'string',
'MpdLocation': 'string',
'OriginManifestType': 'SINGLE_PERIOD'|'MULTI_PERIOD'
},
'HlsConfiguration': {
'ManifestEndpointPrefix': 'string'
},
'Name': 'string',
'PlaybackConfigurationArn': 'string',
'PlaybackEndpointPrefix': 'string',
'SessionInitializationEndpointPrefix': 'string',
'SlateAdUrl': 'string',
'Tags': {
'string': 'string'
},
'TranscodeProfileName': 'string',
'VideoContentSourceUrl': 'string'
}
Response Structure
Success.
The URL for the ad decision server (ADS). This includes the specification of static parameters and placeholders for dynamic parameters. AWS Elemental MediaTailor substitutes player-specific and session-specific parameters as needed when calling the ADS. Alternately, for testing, you can provide a static VAST URL. The maximum length is 25,000 characters.
The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad segment management.
A non-default content delivery network (CDN) to serve ad segments. By default, AWS Elemental MediaTailor uses Amazon CloudFront with default cache settings as its CDN for ad segments. To set up an alternate CDN, create a rule in your CDN for the following origin: ads.mediatailor.<region>.amazonaws.com. Then specify the rule's name in this AdSegmentUrlPrefix. When AWS Elemental MediaTailor serves a manifest, it reports your CDN as the source for ad segments.
A content delivery network (CDN) to cache content segments, so that content requests don’t always have to go to the origin server. First, create a rule in your CDN for the content segment origin server. Then specify the rule's name in this ContentSegmentUrlPrefix. When AWS Elemental MediaTailor serves a manifest, it reports your CDN as the source for content segments.
The configuration for DASH content.
The URL generated by MediaTailor to initiate a playback session. The session uses server-side reporting. This setting is ignored in PUT operations.
The setting that controls whether MediaTailor includes the Location tag in DASH manifests. MediaTailor populates the Location tag with the URL for manifest update requests, to be used by players that don't support sticky redirects. Disable this if you have CDN routing rules set up for accessing MediaTailor manifests, and you are either using client-side reporting or your players support sticky HTTP redirects. Valid values are DISABLED and EMT_DEFAULT. The EMT_DEFAULT setting enables the inclusion of the tag and is the default value.
The setting that controls whether MediaTailor handles manifests from the origin server as multi-period manifests or single-period manifests. If your origin server produces single-period manifests, set this to SINGLE_PERIOD. The default setting is MULTI_PERIOD. For multi-period manifests, omit this setting or set it to MULTI_PERIOD.
The configuration for HLS content.
The URL that is used to initiate a playback session for devices that support Apple HLS. The session uses server-side reporting.
The identifier for the playback configuration.
The Amazon Resource Name (ARN) for the playback configuration.
The URL that the player accesses to get a manifest from AWS Elemental MediaTailor. This session will use server-side reporting.
The URL that the player uses to initialize a session that uses client-side reporting.
The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. AWS Elemental MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is optional for non-VPAID playback configurations. For VPAID, the slate is required because MediaTailor provides it in the slots designated for dynamic ad content. The slate must be a high-quality asset that contains both audio and video.
The tags assigned to the playback configuration.
The name that is used to associate this playback configuration with a custom transcode profile. This overrides the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up custom profiles with the help of AWS Support.
The URL prefix for the master playlist for the stream, minus the asset ID. The maximum length is 512 characters.
Returns an object that can wait for some condition.
Returns a list of the playback configurations defined in AWS Elemental MediaTailor. You can specify a maximum number of configurations to return at a time. The default maximum is 50. Results are returned in pagefuls. If MediaTailor has more configurations than the specified maximum, it provides parameters in the response that you can use to retrieve the next pageful.
See also: AWS API Documentation
Request Syntax
response = client.list_playback_configurations(
MaxResults=123,
NextToken='string'
)
dict
Response Syntax
{
'Items': [
{
'AdDecisionServerUrl': 'string',
'CdnConfiguration': {
'AdSegmentUrlPrefix': 'string',
'ContentSegmentUrlPrefix': 'string'
},
'DashConfiguration': {
'ManifestEndpointPrefix': 'string',
'MpdLocation': 'string',
'OriginManifestType': 'SINGLE_PERIOD'|'MULTI_PERIOD'
},
'HlsConfiguration': {
'ManifestEndpointPrefix': 'string'
},
'Name': 'string',
'PlaybackConfigurationArn': 'string',
'PlaybackEndpointPrefix': 'string',
'SessionInitializationEndpointPrefix': 'string',
'SlateAdUrl': 'string',
'Tags': {
'string': 'string'
},
'TranscodeProfileName': 'string',
'VideoContentSourceUrl': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Success.
Items (list) --
Array of playback configurations. This might be all the available configurations or a subset, depending on the settings that you provide and the total number of configurations stored.
(dict) --
The AWSMediaTailor configuration.
AdDecisionServerUrl (string) --
The URL for the ad decision server (ADS). This includes the specification of static parameters and placeholders for dynamic parameters. AWS Elemental MediaTailor substitutes player-specific and session-specific parameters as needed when calling the ADS. Alternately, for testing, you can provide a static VAST URL. The maximum length is 25,000 characters.
CdnConfiguration (dict) --
The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad segment management.
AdSegmentUrlPrefix (string) --
A non-default content delivery network (CDN) to serve ad segments. By default, AWS Elemental MediaTailor uses Amazon CloudFront with default cache settings as its CDN for ad segments. To set up an alternate CDN, create a rule in your CDN for the following origin: ads.mediatailor.<region>.amazonaws.com. Then specify the rule's name in this AdSegmentUrlPrefix. When AWS Elemental MediaTailor serves a manifest, it reports your CDN as the source for ad segments.
ContentSegmentUrlPrefix (string) --
A content delivery network (CDN) to cache content segments, so that content requests don’t always have to go to the origin server. First, create a rule in your CDN for the content segment origin server. Then specify the rule's name in this ContentSegmentUrlPrefix. When AWS Elemental MediaTailor serves a manifest, it reports your CDN as the source for content segments.
DashConfiguration (dict) --
The configuration for DASH content.
ManifestEndpointPrefix (string) --
The URL generated by MediaTailor to initiate a playback session. The session uses server-side reporting. This setting is ignored in PUT operations.
MpdLocation (string) --
The setting that controls whether MediaTailor includes the Location tag in DASH manifests. MediaTailor populates the Location tag with the URL for manifest update requests, to be used by players that don't support sticky redirects. Disable this if you have CDN routing rules set up for accessing MediaTailor manifests, and you are either using client-side reporting or your players support sticky HTTP redirects. Valid values are DISABLED and EMT_DEFAULT. The EMT_DEFAULT setting enables the inclusion of the tag and is the default value.
OriginManifestType (string) --
The setting that controls whether MediaTailor handles manifests from the origin server as multi-period manifests or single-period manifests. If your origin server produces single-period manifests, set this to SINGLE_PERIOD. The default setting is MULTI_PERIOD. For multi-period manifests, omit this setting or set it to MULTI_PERIOD.
HlsConfiguration (dict) --
The configuration for HLS content.
ManifestEndpointPrefix (string) --
The URL that is used to initiate a playback session for devices that support Apple HLS. The session uses server-side reporting.
Name (string) --
The identifier for the playback configuration.
PlaybackConfigurationArn (string) --
The Amazon Resource Name (ARN) for the playback configuration.
PlaybackEndpointPrefix (string) --
The URL that the player accesses to get a manifest from AWS Elemental MediaTailor. This session will use server-side reporting.
SessionInitializationEndpointPrefix (string) --
The URL that the player uses to initialize a session that uses client-side reporting.
SlateAdUrl (string) --
The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. AWS Elemental MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is optional for non-VPAID playback configurations. For VPAID, the slate is required because MediaTailor provides it in the slots designated for dynamic ad content. The slate must be a high-quality asset that contains both audio and video.
Tags (dict) --
The tags assigned to the playback configuration.
TranscodeProfileName (string) --
The name that is used to associate this playback configuration with a custom transcode profile. This overrides the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up custom profiles with the help of AWS Support.
VideoContentSourceUrl (string) --
The URL prefix for the master playlist for the stream, minus the asset ID. The maximum length is 512 characters.
NextToken (string) --
Pagination token returned by the GET list request when results exceed the maximum allowed. Use the token to fetch the next page of results.
Returns a list of the tags assigned to the specified playback configuration resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) for the playback configuration. You can get this from the response to any playback configuration request.
{
'Tags': {
'string': 'string'
}
}
Response Structure
Success.
A comma-separated list of tag key:value pairs. For example: { "Key1": "Value1", "Key2": "Value2" }
Adds a new playback configuration to AWS Elemental MediaTailor.
See also: AWS API Documentation
Request Syntax
response = client.put_playback_configuration(
AdDecisionServerUrl='string',
CdnConfiguration={
'AdSegmentUrlPrefix': 'string',
'ContentSegmentUrlPrefix': 'string'
},
DashConfiguration={
'MpdLocation': 'string',
'OriginManifestType': 'SINGLE_PERIOD'|'MULTI_PERIOD'
},
Name='string',
SlateAdUrl='string',
Tags={
'string': 'string'
},
TranscodeProfileName='string',
VideoContentSourceUrl='string'
)
The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad segment management.
A non-default content delivery network (CDN) to serve ad segments. By default, AWS Elemental MediaTailor uses Amazon CloudFront with default cache settings as its CDN for ad segments. To set up an alternate CDN, create a rule in your CDN for the following origin: ads.mediatailor.<region>.amazonaws.com. Then specify the rule's name in this AdSegmentUrlPrefix. When AWS Elemental MediaTailor serves a manifest, it reports your CDN as the source for ad segments.
A content delivery network (CDN) to cache content segments, so that content requests don’t always have to go to the origin server. First, create a rule in your CDN for the content segment origin server. Then specify the rule's name in this ContentSegmentUrlPrefix. When AWS Elemental MediaTailor serves a manifest, it reports your CDN as the source for content segments.
The configuration for DASH content.
The setting that controls whether MediaTailor includes the Location tag in DASH manifests. MediaTailor populates the Location tag with the URL for manifest update requests, to be used by players that don't support sticky redirects. Disable this if you have CDN routing rules set up for accessing MediaTailor manifests, and you are either using client-side reporting or your players support sticky HTTP redirects. Valid values are DISABLED and EMT_DEFAULT. The EMT_DEFAULT setting enables the inclusion of the tag and is the default value.
The setting that controls whether MediaTailor handles manifests from the origin server as multi-period manifests or single-period manifests. If your origin server produces single-period manifests, set this to SINGLE_PERIOD. The default setting is MULTI_PERIOD. For multi-period manifests, omit this setting or set it to MULTI_PERIOD.
The tags to assign to the playback configuration.
dict
Response Syntax
{
'AdDecisionServerUrl': 'string',
'CdnConfiguration': {
'AdSegmentUrlPrefix': 'string',
'ContentSegmentUrlPrefix': 'string'
},
'DashConfiguration': {
'ManifestEndpointPrefix': 'string',
'MpdLocation': 'string',
'OriginManifestType': 'SINGLE_PERIOD'|'MULTI_PERIOD'
},
'HlsConfiguration': {
'ManifestEndpointPrefix': 'string'
},
'Name': 'string',
'PlaybackConfigurationArn': 'string',
'PlaybackEndpointPrefix': 'string',
'SessionInitializationEndpointPrefix': 'string',
'SlateAdUrl': 'string',
'Tags': {
'string': 'string'
},
'TranscodeProfileName': 'string',
'VideoContentSourceUrl': 'string'
}
Response Structure
(dict) --
Success.
AdDecisionServerUrl (string) --
The URL for the ad decision server (ADS). This includes the specification of static parameters and placeholders for dynamic parameters. AWS Elemental MediaTailor substitutes player-specific and session-specific parameters as needed when calling the ADS. Alternately, for testing, you can provide a static VAST URL. The maximum length is 25,000 characters.
CdnConfiguration (dict) --
The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad segment management.
AdSegmentUrlPrefix (string) --
A non-default content delivery network (CDN) to serve ad segments. By default, AWS Elemental MediaTailor uses Amazon CloudFront with default cache settings as its CDN for ad segments. To set up an alternate CDN, create a rule in your CDN for the following origin: ads.mediatailor.<region>.amazonaws.com. Then specify the rule's name in this AdSegmentUrlPrefix. When AWS Elemental MediaTailor serves a manifest, it reports your CDN as the source for ad segments.
ContentSegmentUrlPrefix (string) --
A content delivery network (CDN) to cache content segments, so that content requests don’t always have to go to the origin server. First, create a rule in your CDN for the content segment origin server. Then specify the rule's name in this ContentSegmentUrlPrefix. When AWS Elemental MediaTailor serves a manifest, it reports your CDN as the source for content segments.
DashConfiguration (dict) --
The configuration for DASH content.
ManifestEndpointPrefix (string) --
The URL generated by MediaTailor to initiate a playback session. The session uses server-side reporting. This setting is ignored in PUT operations.
MpdLocation (string) --
The setting that controls whether MediaTailor includes the Location tag in DASH manifests. MediaTailor populates the Location tag with the URL for manifest update requests, to be used by players that don't support sticky redirects. Disable this if you have CDN routing rules set up for accessing MediaTailor manifests, and you are either using client-side reporting or your players support sticky HTTP redirects. Valid values are DISABLED and EMT_DEFAULT. The EMT_DEFAULT setting enables the inclusion of the tag and is the default value.
OriginManifestType (string) --
The setting that controls whether MediaTailor handles manifests from the origin server as multi-period manifests or single-period manifests. If your origin server produces single-period manifests, set this to SINGLE_PERIOD. The default setting is MULTI_PERIOD. For multi-period manifests, omit this setting or set it to MULTI_PERIOD.
HlsConfiguration (dict) --
The configuration for HLS content.
ManifestEndpointPrefix (string) --
The URL that is used to initiate a playback session for devices that support Apple HLS. The session uses server-side reporting.
Name (string) --
The identifier for the playback configuration.
PlaybackConfigurationArn (string) --
The Amazon Resource Name (ARN) for the playback configuration.
PlaybackEndpointPrefix (string) --
The URL that the player accesses to get a manifest from AWS Elemental MediaTailor. This session will use server-side reporting.
SessionInitializationEndpointPrefix (string) --
The URL that the player uses to initialize a session that uses client-side reporting.
SlateAdUrl (string) --
The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. AWS Elemental MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is optional for non-VPAID playback configurations. For VPAID, the slate is required because MediaTailor provides it in the slots designated for dynamic ad content. The slate must be a high-quality asset that contains both audio and video.
Tags (dict) --
The tags assigned to the playback configuration.
TranscodeProfileName (string) --
The name that is used to associate this playback configuration with a custom transcode profile. This overrides the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up custom profiles with the help of AWS Support.
VideoContentSourceUrl (string) --
The URL prefix for the master playlist for the stream, minus the asset ID. The maximum length is 512 characters.
Adds tags to the specified playback configuration resource. You can specify one or more tags to add.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceArn='string',
Tags={
'string': 'string'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) for the playback configuration. You can get this from the response to any playback configuration request.
[REQUIRED]
A comma-separated list of tag key:value pairs. For example: { "Key1": "Value1", "Key2": "Value2" }
None
Removes tags from the specified playback configuration resource. You can specify one or more tags to remove.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceArn='string',
TagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) for the playback configuration. You can get this from the response to any playback configuration request.
[REQUIRED]
A comma-separated list of the tag keys to remove from the playback configuration.
None
The available paginators are:
paginator = client.get_paginator('list_playback_configurations')
Creates an iterator that will paginate through responses from MediaTailor.Client.list_playback_configurations().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'Items': [
{
'AdDecisionServerUrl': 'string',
'CdnConfiguration': {
'AdSegmentUrlPrefix': 'string',
'ContentSegmentUrlPrefix': 'string'
},
'DashConfiguration': {
'ManifestEndpointPrefix': 'string',
'MpdLocation': 'string',
'OriginManifestType': 'SINGLE_PERIOD'|'MULTI_PERIOD'
},
'HlsConfiguration': {
'ManifestEndpointPrefix': 'string'
},
'Name': 'string',
'PlaybackConfigurationArn': 'string',
'PlaybackEndpointPrefix': 'string',
'SessionInitializationEndpointPrefix': 'string',
'SlateAdUrl': 'string',
'Tags': {
'string': 'string'
},
'TranscodeProfileName': 'string',
'VideoContentSourceUrl': 'string'
},
],
}
Response Structure
Success.
Array of playback configurations. This might be all the available configurations or a subset, depending on the settings that you provide and the total number of configurations stored.
The AWSMediaTailor configuration.
The URL for the ad decision server (ADS). This includes the specification of static parameters and placeholders for dynamic parameters. AWS Elemental MediaTailor substitutes player-specific and session-specific parameters as needed when calling the ADS. Alternately, for testing, you can provide a static VAST URL. The maximum length is 25,000 characters.
The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad segment management.
A non-default content delivery network (CDN) to serve ad segments. By default, AWS Elemental MediaTailor uses Amazon CloudFront with default cache settings as its CDN for ad segments. To set up an alternate CDN, create a rule in your CDN for the following origin: ads.mediatailor.<region>.amazonaws.com. Then specify the rule's name in this AdSegmentUrlPrefix. When AWS Elemental MediaTailor serves a manifest, it reports your CDN as the source for ad segments.
A content delivery network (CDN) to cache content segments, so that content requests don’t always have to go to the origin server. First, create a rule in your CDN for the content segment origin server. Then specify the rule's name in this ContentSegmentUrlPrefix. When AWS Elemental MediaTailor serves a manifest, it reports your CDN as the source for content segments.
The configuration for DASH content.
The URL generated by MediaTailor to initiate a playback session. The session uses server-side reporting. This setting is ignored in PUT operations.
The setting that controls whether MediaTailor includes the Location tag in DASH manifests. MediaTailor populates the Location tag with the URL for manifest update requests, to be used by players that don't support sticky redirects. Disable this if you have CDN routing rules set up for accessing MediaTailor manifests, and you are either using client-side reporting or your players support sticky HTTP redirects. Valid values are DISABLED and EMT_DEFAULT. The EMT_DEFAULT setting enables the inclusion of the tag and is the default value.
The setting that controls whether MediaTailor handles manifests from the origin server as multi-period manifests or single-period manifests. If your origin server produces single-period manifests, set this to SINGLE_PERIOD. The default setting is MULTI_PERIOD. For multi-period manifests, omit this setting or set it to MULTI_PERIOD.
The configuration for HLS content.
The URL that is used to initiate a playback session for devices that support Apple HLS. The session uses server-side reporting.
The identifier for the playback configuration.
The Amazon Resource Name (ARN) for the playback configuration.
The URL that the player accesses to get a manifest from AWS Elemental MediaTailor. This session will use server-side reporting.
The URL that the player uses to initialize a session that uses client-side reporting.
The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. AWS Elemental MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is optional for non-VPAID playback configurations. For VPAID, the slate is required because MediaTailor provides it in the slots designated for dynamic ad content. The slate must be a high-quality asset that contains both audio and video.
The tags assigned to the playback configuration.
The name that is used to associate this playback configuration with a custom transcode profile. This overrides the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up custom profiles with the help of AWS Support.
The URL prefix for the master playlist for the stream, minus the asset ID. The maximum length is 512 characters.