MediaTailor

Table of Contents

Client

class MediaTailor.Client

A low-level client representing AWS MediaTailor:

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

Return type
dict
Returns
Response Syntax
{}

Response Structure

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

Return type
dict
Returns
Response Syntax
{
    'AdDecisionServerUrl': 'string',
    'CdnConfiguration': {
        'AdSegmentUrlPrefix': 'string',
        'ContentSegmentUrlPrefix': 'string'
    },
    'HlsConfiguration': {
        'ManifestEndpointPrefix': 'string'
    },
    'Name': 'string',
    'PlaybackEndpointPrefix': 'string',
    'SessionInitializationEndpointPrefix': 'string',
    'SlateAdUrl': 'string',
    'VideoContentSourceUrl': 'string'
}

Response Structure

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

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

      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 AWS Elemental 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.

    • 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 configurations defined in AWS Elemental MediaTailor. You can specify a max number of configurations to return at a time. The default max is 50. Results are returned in pagefuls. If AWS Elemental MediaTailor has more configurations than the specified max, 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 overrun the meximum allowed. Use the token to fetch the next page of results.
Return type

dict

Returns

Response Syntax

{
    'Items': [
        {
            'AdDecisionServerUrl': 'string',
            'CdnConfiguration': {
                'AdSegmentUrlPrefix': 'string',
                'ContentSegmentUrlPrefix': 'string'
            },
            'Name': 'string',
            'SlateAdUrl': 'string',
            'VideoContentSourceUrl': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Items (list) --

      Array of playback configurations. This may be all of the available configurations or a subset, depending on the settings you provide and on 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 25000 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.

        • Name (string) --

          The identifier for the configuration.

        • SlateAdUrl (string) --

          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 AWS Elemental 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.

        • 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 overrun the meximum allowed. Use the token to fetch the next page of results.

put_playback_configuration(**kwargs)

Adds a new configuration to AWS Elemental MediaTailor.

See also: AWS API Documentation

Request Syntax

response = client.put_playback_configuration(
    AdDecisionServerUrl='string',
    CdnConfiguration={
        'AdSegmentUrlPrefix': 'string',
        'ContentSegmentUrlPrefix': 'string'
    },
    Name='string',
    SlateAdUrl='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 25000 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.

  • Name (string) -- The identifier for the configuration.
  • 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 AWS Elemental 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.
  • 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',
    'CdnConfiguration': {
        'AdSegmentUrlPrefix': 'string',
        'ContentSegmentUrlPrefix': 'string'
    },
    'HlsConfiguration': {
        'ManifestEndpointPrefix': 'string'
    },
    'Name': 'string',
    'PlaybackEndpointPrefix': 'string',
    'SessionInitializationEndpointPrefix': 'string',
    'SlateAdUrl': 'string',
    'VideoContentSourceUrl': 'string'
}

Response Structure

  • (dict) --

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

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

      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 AWS Elemental 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.

    • VideoContentSourceUrl (string) --

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

Paginators

The available paginators are: