MediaTailor

Table of Contents

Client

class MediaTailor.Client

A low-level client representing AWS MediaTailor

Use the AWS Elemental MediaTailor SDK to configure scalable ad insertion for your live and VOD content. With AWS Elemental MediaTailor, you can serve targeted ads to viewers while maintaining broadcast quality in over-the-top (OTT) video applications. For information about using the service, including detailed information about the settings covered in this guide, see the AWS Elemental MediaTailor User Guide.

Through the SDK, you manage AWS Elemental MediaTailor configurations the same as you do through the console. For example, you specify ad insertion behavior and mapping information for the origin server and the ad decision server (ADS).

import boto3

client = boto3.client('mediatailor')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
delete_playback_configuration(**kwargs)

Deletes the playback configuration for the specified name.

See also: AWS API Documentation

Request Syntax

response = client.delete_playback_configuration(
    Name='string'
)
Parameters
Name (string) --

[REQUIRED]

The identifier for the playback configuration.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

    The request was successful and there is no content in the response.

generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_playback_configuration(**kwargs)

Returns the playback configuration for the specified name.

See also: AWS API Documentation

Request Syntax

response = client.get_playback_configuration(
    Name='string'
)
Parameters
Name (string) --

[REQUIRED]

The identifier for the playback configuration.

Return type
dict
Returns
Response Syntax
{
    'AdDecisionServerUrl': 'string',
    'AvailSuppression': {
        'Mode': 'OFF'|'BEHIND_LIVE_EDGE',
        'Value': 'string'
    },
    'Bumper': {
        'EndUrl': 'string',
        'StartUrl': 'string'
    },
    'CdnConfiguration': {
        'AdSegmentUrlPrefix': 'string',
        'ContentSegmentUrlPrefix': 'string'
    },
    'ConfigurationAliases': {
        'string': {
            'string': 'string'
        }
    },
    'DashConfiguration': {
        'ManifestEndpointPrefix': 'string',
        'MpdLocation': 'string',
        'OriginManifestType': 'SINGLE_PERIOD'|'MULTI_PERIOD'
    },
    'HlsConfiguration': {
        'ManifestEndpointPrefix': 'string'
    },
    'LivePreRollConfiguration': {
        'AdDecisionServerUrl': 'string',
        'MaxDurationSeconds': 123
    },
    'ManifestProcessingRules': {
        'AdMarkerPassthrough': {
            'Enabled': True|False
        }
    },
    'Name': 'string',
    'PersonalizationThresholdSeconds': 123,
    '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.

    • AvailSuppression (dict) --

      The configuration for Avail Suppression. Ad suppression can be used to turn off ad personalization in a long manifest, or if a viewer joins mid-break.

      • Mode (string) -- Sets the mode for avail suppression, also known as ad suppression. By default, ad suppression is off and all ad breaks are filled by MediaTailor with ads or slate.
      • Value (string) -- The avail suppression value is a live edge offset time in HH:MM:SS. MediaTailor won't fill ad breaks on or behind this time in the manifest lookback window.
    • Bumper (dict) --

      The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the end of an ad break.

      • EndUrl (string) --

        The URL for the end bumper asset.

      • StartUrl (string) --

        The URL for the start bumper asset.

    • 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.

    • ConfigurationAliases (dict) --

      Predefined aliases for dynamic variables.

      • (string) --

        The dynamic variable that has aliases.

        • (dict) --

          Map of aliases to the value to be used at request time.

          • (string) --
            • (string) --
    • 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.

    • LivePreRollConfiguration (dict) --

      The configuration for pre-roll ad insertion.

      • AdDecisionServerUrl (string) --

        The URL for the ad decision server (ADS) for pre-roll 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.

      • MaxDurationSeconds (integer) -- The maximum allowed duration for the pre-roll ad avail. AWS Elemental MediaTailor won't play pre-roll ads to exceed this duration, regardless of the total duration of ads that the ADS returns.
    • ManifestProcessingRules (dict) --

      The configuration for manifest processing rules. Manifest processing rules enable customization of the personalized manifests created by MediaTailor.

      • AdMarkerPassthrough (dict) --

        The configuration for Ad Marker Passthrough. Ad marker passthrough can be used to pass ad markers from the origin to the customized manifest.

        • Enabled (boolean) --

          For HLS, when set to true, MediaTailor passes through EXT-X-CUE-IN, EXT-X-CUE-OUT, and EXT-X-SPLICEPOINT-SCTE35 ad markers from the origin manifest to the MediaTailor personalized manifest.

          No logic is applied to these ad markers. For example, if EXT-X-CUE-OUT has a value of 60, but no ads are filled for that ad break, MediaTailor will not set the value to 0.

    • Name (string) --

      The identifier for the playback configuration.

    • PersonalizationThresholdSeconds (integer) --

      The maximum duration of underfilled ad time (in seconds) allowed in an ad break.

    • 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.

      • (string) --
        • (string) --
    • 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.

get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_playback_configurations(**kwargs)

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'
)
Parameters
  • MaxResults (integer) -- Maximum number of records to return.
  • 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.
Return type

dict

Returns

Response Syntax

{
    'Items': [
        {
            'AdDecisionServerUrl': 'string',
            'AvailSuppression': {
                'Mode': 'OFF'|'BEHIND_LIVE_EDGE',
                'Value': 'string'
            },
            'Bumper': {
                'EndUrl': 'string',
                'StartUrl': 'string'
            },
            'CdnConfiguration': {
                'AdSegmentUrlPrefix': 'string',
                'ContentSegmentUrlPrefix': 'string'
            },
            'ConfigurationAliases': {
                'string': {
                    'string': 'string'
                }
            },
            'DashConfiguration': {
                'ManifestEndpointPrefix': 'string',
                'MpdLocation': 'string',
                'OriginManifestType': 'SINGLE_PERIOD'|'MULTI_PERIOD'
            },
            'HlsConfiguration': {
                'ManifestEndpointPrefix': 'string'
            },
            'ManifestProcessingRules': {
                'AdMarkerPassthrough': {
                    'Enabled': True|False
                }
            },
            'Name': 'string',
            'PlaybackConfigurationArn': 'string',
            'PlaybackEndpointPrefix': 'string',
            'SessionInitializationEndpointPrefix': 'string',
            'SlateAdUrl': 'string',
            'Tags': {
                'string': 'string'
            },
            'TranscodeProfileName': 'string',
            'PersonalizationThresholdSeconds': 123,
            '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.

        • AvailSuppression (dict) --

          The configuration for Avail Suppression. Ad suppression can be used to turn off ad personalization in a long manifest, or if a viewer joins mid-break.

          • Mode (string) -- Sets the mode for avail suppression, also known as ad suppression. By default, ad suppression is off and all ad breaks are filled by MediaTailor with ads or slate.
          • Value (string) -- The avail suppression value is a live edge offset time in HH:MM:SS. MediaTailor won't fill ad breaks on or behind this time in the manifest lookback window.
        • Bumper (dict) --

          The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the end of an ad break.

          • EndUrl (string) --

            The URL for the end bumper asset.

          • StartUrl (string) --

            The URL for the start bumper asset.

        • 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.

        • ConfigurationAliases (dict) --

          Predefined aliases for dynamic variables.

          • (string) --

            The dynamic variable that has aliases.

            • (dict) --

              Map of aliases to the value to be used at request time.

              • (string) --
                • (string) --
        • 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.

        • ManifestProcessingRules (dict) --

          The configuration for manifest processing rules. Manifest processing rules enable customization of the personalized manifests created by MediaTailor.

          • AdMarkerPassthrough (dict) --

            The configuration for Ad Marker Passthrough. Ad marker passthrough can be used to pass ad markers from the origin to the customized manifest.

            • Enabled (boolean) --

              For HLS, when set to true, MediaTailor passes through EXT-X-CUE-IN, EXT-X-CUE-OUT, and EXT-X-SPLICEPOINT-SCTE35 ad markers from the origin manifest to the MediaTailor personalized manifest.

              No logic is applied to these ad markers. For example, if EXT-X-CUE-OUT has a value of 60, but no ads are filled for that ad break, MediaTailor will not set the value to 0.

        • 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.

          • (string) --
            • (string) --
        • 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.

        • PersonalizationThresholdSeconds (integer) --

          The maximum duration of underfilled ad time (in seconds) allowed in an ad break.

        • 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.

list_tags_for_resource(**kwargs)

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'
)
Parameters
ResourceArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) for the playback configuration. You can get this from the response to any playback configuration request.

Return type
dict
Returns
Response Syntax
{
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    Success.

    • Tags (dict) --

      A comma-separated list of tag key:value pairs. For example: { "Key1": "Value1", "Key2": "Value2" }

      • (string) --
        • (string) --

Exceptions

  • MediaTailor.Client.exceptions.BadRequestException
put_playback_configuration(**kwargs)

Adds a new playback configuration to AWS Elemental MediaTailor.

See also: AWS API Documentation

Request Syntax

response = client.put_playback_configuration(
    AdDecisionServerUrl='string',
    AvailSuppression={
        'Mode': 'OFF'|'BEHIND_LIVE_EDGE',
        'Value': 'string'
    },
    Bumper={
        'EndUrl': 'string',
        'StartUrl': 'string'
    },
    CdnConfiguration={
        'AdSegmentUrlPrefix': 'string',
        'ContentSegmentUrlPrefix': 'string'
    },
    ConfigurationAliases={
        'string': {
            'string': 'string'
        }
    },
    DashConfiguration={
        'MpdLocation': 'string',
        'OriginManifestType': 'SINGLE_PERIOD'|'MULTI_PERIOD'
    },
    LivePreRollConfiguration={
        'AdDecisionServerUrl': 'string',
        'MaxDurationSeconds': 123
    },
    ManifestProcessingRules={
        'AdMarkerPassthrough': {
            'Enabled': True|False
        }
    },
    Name='string',
    PersonalizationThresholdSeconds=123,
    SlateAdUrl='string',
    Tags={
        'string': 'string'
    },
    TranscodeProfileName='string',
    VideoContentSourceUrl='string'
)
Parameters
  • 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.
  • AvailSuppression (dict) --

    The configuration for Avail Suppression. Ad suppression can be used to turn off ad personalization in a long manifest, or if a viewer joins mid-break.

    • Mode (string) -- Sets the mode for avail suppression, also known as ad suppression. By default, ad suppression is off and all ad breaks are filled by MediaTailor with ads or slate.
    • Value (string) -- The avail suppression value is a live edge offset time in HH:MM:SS. MediaTailor won't fill ad breaks on or behind this time in the manifest lookback window.
  • Bumper (dict) --

    The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the end of an ad break.

    • EndUrl (string) --

      The URL for the end bumper asset.

    • StartUrl (string) --

      The URL for the start bumper asset.

  • 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.

  • ConfigurationAliases (dict) --

    Predefined aliases for dynamic variables.

    • (string) --

      The dynamic variable that has aliases.

      • (dict) --

        Map of aliases to the value to be used at request time.

        • (string) --
          • (string) --
  • DashConfiguration (dict) --

    The configuration for DASH content.

    • 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.

  • LivePreRollConfiguration (dict) --

    The configuration for pre-roll ad insertion.

    • AdDecisionServerUrl (string) --

      The URL for the ad decision server (ADS) for pre-roll 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.

    • MaxDurationSeconds (integer) -- The maximum allowed duration for the pre-roll ad avail. AWS Elemental MediaTailor won't play pre-roll ads to exceed this duration, regardless of the total duration of ads that the ADS returns.
  • ManifestProcessingRules (dict) --

    The configuration for manifest processing rules. Manifest processing rules enable customization of the personalized manifests created by MediaTailor.

    • AdMarkerPassthrough (dict) --

      The configuration for Ad Marker Passthrough. Ad marker passthrough can be used to pass ad markers from the origin to the customized manifest.

      • Enabled (boolean) --

        For HLS, when set to true, MediaTailor passes through EXT-X-CUE-IN, EXT-X-CUE-OUT, and EXT-X-SPLICEPOINT-SCTE35 ad markers from the origin manifest to the MediaTailor personalized manifest.

        No logic is applied to these ad markers. For example, if EXT-X-CUE-OUT has a value of 60, but no ads are filled for that ad break, MediaTailor will not set the value to 0.

  • Name (string) -- The identifier for the playback configuration.
  • PersonalizationThresholdSeconds (integer) -- The maximum duration of underfilled ad time (in seconds) allowed in an ad break.
  • 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 configurations. For VPAID, the slate is required because MediaTailor provides it in the slots that are designated for dynamic ad content. The slate must be a high-quality asset that contains both audio and video.
  • Tags (dict) --

    The tags to assign to the playback configuration.

    • (string) --
      • (string) --
  • 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.
Return type

dict

Returns

Response Syntax

{
    'AdDecisionServerUrl': 'string',
    'AvailSuppression': {
        'Mode': 'OFF'|'BEHIND_LIVE_EDGE',
        'Value': 'string'
    },
    'Bumper': {
        'EndUrl': 'string',
        'StartUrl': 'string'
    },
    'CdnConfiguration': {
        'AdSegmentUrlPrefix': 'string',
        'ContentSegmentUrlPrefix': 'string'
    },
    'ConfigurationAliases': {
        'string': {
            'string': 'string'
        }
    },
    'DashConfiguration': {
        'ManifestEndpointPrefix': 'string',
        'MpdLocation': 'string',
        'OriginManifestType': 'SINGLE_PERIOD'|'MULTI_PERIOD'
    },
    'HlsConfiguration': {
        'ManifestEndpointPrefix': 'string'
    },
    'LivePreRollConfiguration': {
        'AdDecisionServerUrl': 'string',
        'MaxDurationSeconds': 123
    },
    'ManifestProcessingRules': {
        'AdMarkerPassthrough': {
            'Enabled': True|False
        }
    },
    'Name': 'string',
    'PersonalizationThresholdSeconds': 123,
    '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.

    • AvailSuppression (dict) --

      The configuration for Avail Suppression. Ad suppression can be used to turn off ad personalization in a long manifest, or if a viewer joins mid-break.

      • Mode (string) -- Sets the mode for avail suppression, also known as ad suppression. By default, ad suppression is off and all ad breaks are filled by MediaTailor with ads or slate.
      • Value (string) -- The avail suppression value is a live edge offset time in HH:MM:SS. MediaTailor won't fill ad breaks on or behind this time in the manifest lookback window.
    • Bumper (dict) --

      The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the end of an ad break.

      • EndUrl (string) --

        The URL for the end bumper asset.

      • StartUrl (string) --

        The URL for the start bumper asset.

    • 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.

    • ConfigurationAliases (dict) --

      Predefined aliases for dynamic variables.

      • (string) --

        The dynamic variable that has aliases.

        • (dict) --

          Map of aliases to the value to be used at request time.

          • (string) --
            • (string) --
    • 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.

    • LivePreRollConfiguration (dict) --

      The configuration for pre-roll ad insertion.

      • AdDecisionServerUrl (string) --

        The URL for the ad decision server (ADS) for pre-roll 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.

      • MaxDurationSeconds (integer) -- The maximum allowed duration for the pre-roll ad avail. AWS Elemental MediaTailor won't play pre-roll ads to exceed this duration, regardless of the total duration of ads that the ADS returns.

    • ManifestProcessingRules (dict) -- The configuration for manifest processing rules. Manifest processing rules enable customization of the personalized manifests created by MediaTailor.

      • AdMarkerPassthrough (dict) --

        The configuration for Ad Marker Passthrough. Ad marker passthrough can be used to pass ad markers from the origin to the customized manifest.

        • Enabled (boolean) --

          For HLS, when set to true, MediaTailor passes through EXT-X-CUE-IN, EXT-X-CUE-OUT, and EXT-X-SPLICEPOINT-SCTE35 ad markers from the origin manifest to the MediaTailor personalized manifest.

          No logic is applied to these ad markers. For example, if EXT-X-CUE-OUT has a value of 60, but no ads are filled for that ad break, MediaTailor will not set the value to 0.

    • Name (string) --

      The identifier for the playback configuration.

    • PersonalizationThresholdSeconds (integer) --

      The maximum duration of underfilled ad time (in seconds) allowed in an ad break.

    • 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.

      • (string) --
        • (string) --
    • 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.

tag_resource(**kwargs)

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'
    }
)
Parameters
  • 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 (dict) --

    [REQUIRED]

    A comma-separated list of tag key:value pairs. For example: { "Key1": "Value1", "Key2": "Value2" }

    • (string) --
      • (string) --
Returns

None

Exceptions

  • MediaTailor.Client.exceptions.BadRequestException
untag_resource(**kwargs)

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',
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) for the playback configuration. You can get this from the response to any playback configuration request.

  • TagKeys (list) --

    [REQUIRED]

    A comma-separated list of the tag keys to remove from the playback configuration.

    • (string) --
Returns

None

Exceptions

  • MediaTailor.Client.exceptions.BadRequestException

Paginators

The available paginators are:

class MediaTailor.Paginator.ListPlaybackConfigurations
paginator = client.get_paginator('list_playback_configurations')
paginate(**kwargs)

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'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    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.

  • PageSize (integer) --

    The size of each page.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'Items': [
        {
            'AdDecisionServerUrl': 'string',
            'AvailSuppression': {
                'Mode': 'OFF'|'BEHIND_LIVE_EDGE',
                'Value': 'string'
            },
            'Bumper': {
                'EndUrl': 'string',
                'StartUrl': 'string'
            },
            'CdnConfiguration': {
                'AdSegmentUrlPrefix': 'string',
                'ContentSegmentUrlPrefix': 'string'
            },
            'ConfigurationAliases': {
                'string': {
                    'string': 'string'
                }
            },
            'DashConfiguration': {
                'ManifestEndpointPrefix': 'string',
                'MpdLocation': 'string',
                'OriginManifestType': 'SINGLE_PERIOD'|'MULTI_PERIOD'
            },
            'HlsConfiguration': {
                'ManifestEndpointPrefix': 'string'
            },
            'ManifestProcessingRules': {
                'AdMarkerPassthrough': {
                    'Enabled': True|False
                }
            },
            'Name': 'string',
            'PlaybackConfigurationArn': 'string',
            'PlaybackEndpointPrefix': 'string',
            'SessionInitializationEndpointPrefix': 'string',
            'SlateAdUrl': 'string',
            'Tags': {
                'string': 'string'
            },
            'TranscodeProfileName': 'string',
            'PersonalizationThresholdSeconds': 123,
            'VideoContentSourceUrl': '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.

        • AvailSuppression (dict) --

          The configuration for Avail Suppression. Ad suppression can be used to turn off ad personalization in a long manifest, or if a viewer joins mid-break.

          • Mode (string) -- Sets the mode for avail suppression, also known as ad suppression. By default, ad suppression is off and all ad breaks are filled by MediaTailor with ads or slate.
          • Value (string) -- The avail suppression value is a live edge offset time in HH:MM:SS. MediaTailor won't fill ad breaks on or behind this time in the manifest lookback window.
        • Bumper (dict) --

          The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the end of an ad break.

          • EndUrl (string) --

            The URL for the end bumper asset.

          • StartUrl (string) --

            The URL for the start bumper asset.

        • 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.

        • ConfigurationAliases (dict) --

          Predefined aliases for dynamic variables.

          • (string) --

            The dynamic variable that has aliases.

            • (dict) --

              Map of aliases to the value to be used at request time.

              • (string) --
                • (string) --
        • 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.

        • ManifestProcessingRules (dict) --

          The configuration for manifest processing rules. Manifest processing rules enable customization of the personalized manifests created by MediaTailor.

          • AdMarkerPassthrough (dict) --

            The configuration for Ad Marker Passthrough. Ad marker passthrough can be used to pass ad markers from the origin to the customized manifest.

            • Enabled (boolean) --

              For HLS, when set to true, MediaTailor passes through EXT-X-CUE-IN, EXT-X-CUE-OUT, and EXT-X-SPLICEPOINT-SCTE35 ad markers from the origin manifest to the MediaTailor personalized manifest.

              No logic is applied to these ad markers. For example, if EXT-X-CUE-OUT has a value of 60, but no ads are filled for that ad break, MediaTailor will not set the value to 0.

        • 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.

          • (string) --
            • (string) --
        • 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.

        • PersonalizationThresholdSeconds (integer) --

          The maximum duration of underfilled ad time (in seconds) allowed in an ad break.

        • VideoContentSourceUrl (string) --

          The URL prefix for the master playlist for the stream, minus the asset ID. The maximum length is 512 characters.