AWS MediaTailor

2026/09/09 - AWS MediaTailor - 3 updated api methods

Changes  Added the AWS Service Request function type for MediaTailor Functions, enabling authenticated requests to AWS Elemental Inference for contextual ad targeting during ad insertion.

GetFunction (updated) Link ¶
Changes (response)
{'AwsServiceRequestConfiguration': {'Body': 'string',
                                    'Headers': {'string': 'string'},
                                    'MethodType': 'GET | POST',
                                    'Output': {'string': 'string'},
                                    'RequestTimeoutMilliseconds': 'integer',
                                    'Runtime': 'JSONATA',
                                    'TargetRegion': 'string',
                                    'TargetService': 'string',
                                    'Url': 'string'},
 'FunctionType': {'AWS_SERVICE_REQUEST'}}

Retrieves the configuration and metadata for a function. For more information about functions, see Working with functions in the MediaTailor User Guide.

See also: AWS API Documentation

Request Syntax

client.get_function(
    FunctionId='string'
)
type FunctionId:

string

param FunctionId:

[REQUIRED]

The identifier of the function.

rtype:

dict

returns:

Response Syntax

{
    'FunctionId': 'string',
    'FunctionType': 'HTTP_REQUEST'|'AWS_SERVICE_REQUEST'|'CUSTOM_OUTPUT'|'CONCURRENT_EXECUTOR'|'SEQUENTIAL_EXECUTOR'|'VAST_REQUEST',
    'Description': 'string',
    'HttpRequestConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'MethodType': 'GET'|'POST',
        'RequestTimeoutMilliseconds': 123,
        'Url': 'string',
        'Body': 'string',
        'Headers': {
            'string': 'string'
        }
    },
    'AwsServiceRequestConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'MethodType': 'GET'|'POST',
        'RequestTimeoutMilliseconds': 123,
        'Url': 'string',
        'Body': 'string',
        'Headers': {
            'string': 'string'
        },
        'TargetService': 'string',
        'TargetRegion': 'string'
    },
    'CustomOutputConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        }
    },
    'ConcurrentExecutorConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'FunctionList': [
            {
                'RunCondition': 'string',
                'FunctionId': 'string',
                'Alias': 'string'
            },
        ],
        'TimeoutMilliseconds': 123,
        'MaxConcurrency': 123
    },
    'SequentialExecutorConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'FunctionList': [
            {
                'RunCondition': 'string',
                'FunctionId': 'string',
                'Alias': 'string'
            },
        ],
        'TimeoutMilliseconds': 123
    },
    'VastRequestConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'MethodType': 'GET'|'POST',
        'RequestTimeoutMilliseconds': 123,
        'Url': 'string',
        'Body': 'string',
        'Headers': {
            'string': 'string'
        }
    },
    'Tags': {
        'string': 'string'
    },
    'Arn': 'string'
}

Response Structure

  • (dict) --

    -- Define Mixin --

    • FunctionId (string) --

      The identifier of the function.

    • FunctionType (string) --

      The type of the function.

    • Description (string) --

      A description of the function.

    • HttpRequestConfiguration (dict) --

      The configuration for an HTTP_REQUEST function.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

      • Output (dict) --

        A map of output bindings. Each key is a namespaced output path (such as player_params.device_type or temp.identity), and each value is an expression that MediaTailor evaluates at runtime. Output expressions in an HTTP_REQUEST function can reference the response object returned by the HTTP call. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

        • (string) --

          • (string) --

      • MethodType (string) --

        The HTTP method for the request. Valid values: GET and POST.

      • RequestTimeoutMilliseconds (integer) --

        The maximum time, in milliseconds, that MediaTailor waits for a response from the external service. If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values: 100 to 2000.

      • Url (string) --

        An expression that evaluates to the request URL. Use {%...%} delimiters for dynamic expressions. The maximum length after evaluation is 2,048 characters.

      • Body (string) --

        An expression that evaluates to the request body. Used with POST requests. The maximum size after evaluation is 64 KB.

      • Headers (dict) --

        A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound HTTP request. Maximum 50 headers.

        • (string) --

          • (string) --

    • AwsServiceRequestConfiguration (dict) --

      The configuration for an AWS_SERVICE_REQUEST function. Specifies the target service, target Region, and request parameters.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. The only supported value is JSONata.

      • Output (dict) --

        A map of output bindings. Each key is a namespaced output path, such as player_params.device_type. Each value is an expression that MediaTailor evaluates at runtime and can reference the response object from the target service. For more information, see JSONata expression reference in the MediaTailor User Guide.

        • (string) --

          • (string) --

      • MethodType (string) --

        Specifies how the function sends the request to the target service. The value must match what the target service operation requires. Valid values:

        • GET – Retrieves data from the target service.

        • POST – Submits a request body to the target service.

      • RequestTimeoutMilliseconds (integer) --

        The maximum time, in milliseconds, that MediaTailor waits for a response from the AWS service. If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values: 100 to 2000.

      • Url (string) --

        An expression that evaluates to the endpoint URL for the target AWS service API operation. Use {%...%} delimiters for dynamic expressions. The URL must correspond to a valid endpoint for the service specified in TargetService. The maximum length after evaluation is 2,048 characters.

      • Body (string) --

        An expression that evaluates to the request body for the AWS service API call. The body must conform to the input format that the target service operation expects. Applies only when the target operation accepts a request body. The maximum size after evaluation is 64 KB.

      • Headers (dict) --

        A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound request to the AWS service. Use this to pass any headers required by the target service operation. You can include a maximum of 50 headers.

        • (string) --

          • (string) --

      • TargetService (string) --

        The AWS service to call. Valid value: elemental-inference (AWS Elemental Inference).

      • TargetRegion (string) --

        The AWS Region for the target service. Specify a static Region code (for example, us-east-1) or a JSONata expression that resolves to a Region code at runtime (for example, {%inference.region%}).

    • CustomOutputConfiguration (dict) --

      The configuration for a CUSTOM_OUTPUT function.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

      • Output (dict) --

        A map of output bindings. Each key is a namespaced output path (such as player_params.device_type or temp.variant), and each value is an expression that MediaTailor evaluates at runtime against the current session state. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

        • (string) --

          • (string) --

    • ConcurrentExecutorConfiguration (dict) --

      The configuration for a CONCURRENT_EXECUTOR function.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

      • Output (dict) --

        A map of output bindings that controls which bindings the executor commits to the session state after all child functions complete. Each key is a namespaced output path, and each value is an expression that MediaTailor evaluates against the combined results of the child functions.

        • (string) --

          • (string) --

      • FunctionList (list) --

        The list of child functions that MediaTailor runs in parallel. Each entry specifies a child function to execute and an optional run condition expression that controls whether the function runs.

        • (dict) --

          A reference to a child function within a SEQUENTIAL_EXECUTOR function.

          • RunCondition (string) --

            An optional expression that evaluates to a boolean. MediaTailor evaluates this expression immediately before running the step, using the accumulated state at that point in the sequence. If the expression evaluates to false, MediaTailor skips the step and moves to the next one. If omitted, the step always runs.

          • FunctionId (string) --

            The identifier of the child function to execute in this step.

          • Alias (string) --

            An optional alternate name for the function within the executor. If omitted, MediaTailor uses the function identifier.

      • TimeoutMilliseconds (integer) --

        The maximum time, in milliseconds, for all child functions to complete. This timeout covers every function in the list, including any HTTP calls the child functions make. If the executor exceeds this timeout, MediaTailor discards all output from the executor and proceeds with default behavior.

      • MaxConcurrency (integer) --

        The maximum number of child functions that MediaTailor runs simultaneously. When the list contains more functions than MaxConcurrency, MediaTailor starts additional functions as running ones complete, so that no more than MaxConcurrency functions run at the same time.

    • SequentialExecutorConfiguration (dict) --

      The configuration for a SEQUENTIAL_EXECUTOR function.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

      • Output (dict) --

        An optional map of output bindings that controls which bindings the sequence commits to the session state after all steps complete. If omitted, MediaTailor commits all accumulated output bindings from all child steps.

        • (string) --

          • (string) --

      • FunctionList (list) --

        An ordered list of 1 to 10 steps. Each step specifies a child function to execute and an optional run condition expression that controls whether the step runs. MediaTailor executes steps in order, passing data between steps through temporary data.

        • (dict) --

          A reference to a child function within a SEQUENTIAL_EXECUTOR function.

          • RunCondition (string) --

            An optional expression that evaluates to a boolean. MediaTailor evaluates this expression immediately before running the step, using the accumulated state at that point in the sequence. If the expression evaluates to false, MediaTailor skips the step and moves to the next one. If omitted, the step always runs.

          • FunctionId (string) --

            The identifier of the child function to execute in this step.

          • Alias (string) --

            An optional alternate name for the function within the executor. If omitted, MediaTailor uses the function identifier.

      • TimeoutMilliseconds (integer) --

        The maximum time, in milliseconds, for the entire sequence to complete. This timeout covers all steps, including any HTTP calls made by child functions. If the sequence exceeds this timeout, MediaTailor discards all output from the sequence and proceeds with default behavior.

    • VastRequestConfiguration (dict) --

      The configuration for a VAST_REQUEST function.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

      • Output (dict) --

        A map of output bindings. Each key is a namespaced output path (such as temp.wrappedAds), and each value is an expression that MediaTailor evaluates at runtime. Output expressions in a VAST_REQUEST function can reference the response object, which exposes response.parsedAds — the ads parsed from the VAST response after schema validation and wrapper resolution — and response.statusCode. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

        • (string) --

          • (string) --

      • MethodType (string) --

        The HTTP method for the request to the VAST endpoint. Valid values: GET and POST. Use POST to send a bid request body, such as an OpenRTB payload.

      • RequestTimeoutMilliseconds (integer) --

        The maximum time, in milliseconds, that MediaTailor waits for a response from the VAST endpoint. The timeout covers the entire response, including any wrapper redirects that MediaTailor follows. If the call exceeds this timeout, MediaTailor proceeds with an empty ad list and continues output expression evaluation. Valid values: 100 to 2000.

      • Url (string) --

        An expression that evaluates to the VAST endpoint URL. Use {%...%} delimiters for dynamic expressions. A literal value must be an https:// URL. The expression can be up to 25,000 characters, and the URL after evaluation can be up to 2,048 characters.

      • Body (string) --

        An expression that evaluates to the request body, for example to send an OpenRTB bid request. The expression can be up to 100,000 characters, and the body after evaluation can be up to 64 KB.

      • Headers (dict) --

        A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound request. Headers beginning with X-Amz- are reserved by the service, and method override headers are not allowed.

        • (string) --

          • (string) --

    • Tags (dict) --

      The tags assigned to the function. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.

      • (string) --

        • (string) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the function.

ListFunctions (updated) Link ¶
Changes (response)
{'Items': {'AwsServiceRequestConfiguration': {'Body': 'string',
                                              'Headers': {'string': 'string'},
                                              'MethodType': 'GET | POST',
                                              'Output': {'string': 'string'},
                                              'RequestTimeoutMilliseconds': 'integer',
                                              'Runtime': 'JSONATA',
                                              'TargetRegion': 'string',
                                              'TargetService': 'string',
                                              'Url': 'string'},
           'FunctionType': {'AWS_SERVICE_REQUEST'}}}

Retrieves all functions associated with your AWS account in the current Region. For more information about functions, see Working with functions in the MediaTailor User Guide.

See also: AWS API Documentation

Request Syntax

client.list_functions(
    MaxResults=123,
    NextToken='string'
)
type MaxResults:

integer

param MaxResults:

The maximum number of functions that you want MediaTailor to return in response to the current request. If there are more than MaxResults functions, use the value of NextToken in the response to get the next page of results.

The default value is 100. MediaTailor uses token-based pagination, which means that a response might contain fewer than MaxResults items, including 0 items, even when more results are available. To retrieve all results, you must continue making requests using the NextToken value from each response until the response no longer includes a NextToken value.

type NextToken:

string

param NextToken:

Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.

For the first ListFunctions request, omit this value. For subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request. Continue making requests until the response no longer includes a NextToken value, which indicates that all results have been retrieved.

rtype:

dict

returns:

Response Syntax

{
    'Items': [
        {
            'FunctionId': 'string',
            'FunctionType': 'HTTP_REQUEST'|'AWS_SERVICE_REQUEST'|'CUSTOM_OUTPUT'|'CONCURRENT_EXECUTOR'|'SEQUENTIAL_EXECUTOR'|'VAST_REQUEST',
            'Description': 'string',
            'HttpRequestConfiguration': {
                'Runtime': 'JSONATA',
                'Output': {
                    'string': 'string'
                },
                'MethodType': 'GET'|'POST',
                'RequestTimeoutMilliseconds': 123,
                'Url': 'string',
                'Body': 'string',
                'Headers': {
                    'string': 'string'
                }
            },
            'AwsServiceRequestConfiguration': {
                'Runtime': 'JSONATA',
                'Output': {
                    'string': 'string'
                },
                'MethodType': 'GET'|'POST',
                'RequestTimeoutMilliseconds': 123,
                'Url': 'string',
                'Body': 'string',
                'Headers': {
                    'string': 'string'
                },
                'TargetService': 'string',
                'TargetRegion': 'string'
            },
            'CustomOutputConfiguration': {
                'Runtime': 'JSONATA',
                'Output': {
                    'string': 'string'
                }
            },
            'ConcurrentExecutorConfiguration': {
                'Runtime': 'JSONATA',
                'Output': {
                    'string': 'string'
                },
                'FunctionList': [
                    {
                        'RunCondition': 'string',
                        'FunctionId': 'string',
                        'Alias': 'string'
                    },
                ],
                'TimeoutMilliseconds': 123,
                'MaxConcurrency': 123
            },
            'SequentialExecutorConfiguration': {
                'Runtime': 'JSONATA',
                'Output': {
                    'string': 'string'
                },
                'FunctionList': [
                    {
                        'RunCondition': 'string',
                        'FunctionId': 'string',
                        'Alias': 'string'
                    },
                ],
                'TimeoutMilliseconds': 123
            },
            'VastRequestConfiguration': {
                'Runtime': 'JSONATA',
                'Output': {
                    'string': 'string'
                },
                'MethodType': 'GET'|'POST',
                'RequestTimeoutMilliseconds': 123,
                'Url': 'string',
                'Body': 'string',
                'Headers': {
                    'string': 'string'
                }
            },
            'Tags': {
                'string': 'string'
            },
            'Arn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Items (list) --

      A list of functions associated with your account in the current Region.

      • (dict) --

        Defines reusable logic that MediaTailor executes at lifecycle hooks during ad insertion. The FunctionType determines the function's runtime behavior. For more information about functions, see Working with functions in the MediaTailor User Guide.

        • FunctionId (string) --

          The identifier of the function.

        • FunctionType (string) --

          The type of the function.

        • Description (string) --

          A description of the function.

        • HttpRequestConfiguration (dict) --

          The configuration for an HTTP_REQUEST function.

          • Runtime (string) --

            The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

          • Output (dict) --

            A map of output bindings. Each key is a namespaced output path (such as player_params.device_type or temp.identity), and each value is an expression that MediaTailor evaluates at runtime. Output expressions in an HTTP_REQUEST function can reference the response object returned by the HTTP call. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

            • (string) --

              • (string) --

          • MethodType (string) --

            The HTTP method for the request. Valid values: GET and POST.

          • RequestTimeoutMilliseconds (integer) --

            The maximum time, in milliseconds, that MediaTailor waits for a response from the external service. If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values: 100 to 2000.

          • Url (string) --

            An expression that evaluates to the request URL. Use {%...%} delimiters for dynamic expressions. The maximum length after evaluation is 2,048 characters.

          • Body (string) --

            An expression that evaluates to the request body. Used with POST requests. The maximum size after evaluation is 64 KB.

          • Headers (dict) --

            A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound HTTP request. Maximum 50 headers.

            • (string) --

              • (string) --

        • AwsServiceRequestConfiguration (dict) --

          The configuration for an AWS_SERVICE_REQUEST function. Specifies the target service, target Region, and request parameters.

          • Runtime (string) --

            The expression language used to evaluate expressions in the function configuration. The only supported value is JSONata.

          • Output (dict) --

            A map of output bindings. Each key is a namespaced output path, such as player_params.device_type. Each value is an expression that MediaTailor evaluates at runtime and can reference the response object from the target service. For more information, see JSONata expression reference in the MediaTailor User Guide.

            • (string) --

              • (string) --

          • MethodType (string) --

            Specifies how the function sends the request to the target service. The value must match what the target service operation requires. Valid values:

            • GET – Retrieves data from the target service.

            • POST – Submits a request body to the target service.

          • RequestTimeoutMilliseconds (integer) --

            The maximum time, in milliseconds, that MediaTailor waits for a response from the AWS service. If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values: 100 to 2000.

          • Url (string) --

            An expression that evaluates to the endpoint URL for the target AWS service API operation. Use {%...%} delimiters for dynamic expressions. The URL must correspond to a valid endpoint for the service specified in TargetService. The maximum length after evaluation is 2,048 characters.

          • Body (string) --

            An expression that evaluates to the request body for the AWS service API call. The body must conform to the input format that the target service operation expects. Applies only when the target operation accepts a request body. The maximum size after evaluation is 64 KB.

          • Headers (dict) --

            A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound request to the AWS service. Use this to pass any headers required by the target service operation. You can include a maximum of 50 headers.

            • (string) --

              • (string) --

          • TargetService (string) --

            The AWS service to call. Valid value: elemental-inference (AWS Elemental Inference).

          • TargetRegion (string) --

            The AWS Region for the target service. Specify a static Region code (for example, us-east-1) or a JSONata expression that resolves to a Region code at runtime (for example, {%inference.region%}).

        • CustomOutputConfiguration (dict) --

          The configuration for a CUSTOM_OUTPUT function.

          • Runtime (string) --

            The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

          • Output (dict) --

            A map of output bindings. Each key is a namespaced output path (such as player_params.device_type or temp.variant), and each value is an expression that MediaTailor evaluates at runtime against the current session state. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

            • (string) --

              • (string) --

        • ConcurrentExecutorConfiguration (dict) --

          The configuration for a CONCURRENT_EXECUTOR function.

          • Runtime (string) --

            The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

          • Output (dict) --

            A map of output bindings that controls which bindings the executor commits to the session state after all child functions complete. Each key is a namespaced output path, and each value is an expression that MediaTailor evaluates against the combined results of the child functions.

            • (string) --

              • (string) --

          • FunctionList (list) --

            The list of child functions that MediaTailor runs in parallel. Each entry specifies a child function to execute and an optional run condition expression that controls whether the function runs.

            • (dict) --

              A reference to a child function within a SEQUENTIAL_EXECUTOR function.

              • RunCondition (string) --

                An optional expression that evaluates to a boolean. MediaTailor evaluates this expression immediately before running the step, using the accumulated state at that point in the sequence. If the expression evaluates to false, MediaTailor skips the step and moves to the next one. If omitted, the step always runs.

              • FunctionId (string) --

                The identifier of the child function to execute in this step.

              • Alias (string) --

                An optional alternate name for the function within the executor. If omitted, MediaTailor uses the function identifier.

          • TimeoutMilliseconds (integer) --

            The maximum time, in milliseconds, for all child functions to complete. This timeout covers every function in the list, including any HTTP calls the child functions make. If the executor exceeds this timeout, MediaTailor discards all output from the executor and proceeds with default behavior.

          • MaxConcurrency (integer) --

            The maximum number of child functions that MediaTailor runs simultaneously. When the list contains more functions than MaxConcurrency, MediaTailor starts additional functions as running ones complete, so that no more than MaxConcurrency functions run at the same time.

        • SequentialExecutorConfiguration (dict) --

          The configuration for a SEQUENTIAL_EXECUTOR function.

          • Runtime (string) --

            The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

          • Output (dict) --

            An optional map of output bindings that controls which bindings the sequence commits to the session state after all steps complete. If omitted, MediaTailor commits all accumulated output bindings from all child steps.

            • (string) --

              • (string) --

          • FunctionList (list) --

            An ordered list of 1 to 10 steps. Each step specifies a child function to execute and an optional run condition expression that controls whether the step runs. MediaTailor executes steps in order, passing data between steps through temporary data.

            • (dict) --

              A reference to a child function within a SEQUENTIAL_EXECUTOR function.

              • RunCondition (string) --

                An optional expression that evaluates to a boolean. MediaTailor evaluates this expression immediately before running the step, using the accumulated state at that point in the sequence. If the expression evaluates to false, MediaTailor skips the step and moves to the next one. If omitted, the step always runs.

              • FunctionId (string) --

                The identifier of the child function to execute in this step.

              • Alias (string) --

                An optional alternate name for the function within the executor. If omitted, MediaTailor uses the function identifier.

          • TimeoutMilliseconds (integer) --

            The maximum time, in milliseconds, for the entire sequence to complete. This timeout covers all steps, including any HTTP calls made by child functions. If the sequence exceeds this timeout, MediaTailor discards all output from the sequence and proceeds with default behavior.

        • VastRequestConfiguration (dict) --

          The configuration for a VAST_REQUEST function.

          • Runtime (string) --

            The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

          • Output (dict) --

            A map of output bindings. Each key is a namespaced output path (such as temp.wrappedAds), and each value is an expression that MediaTailor evaluates at runtime. Output expressions in a VAST_REQUEST function can reference the response object, which exposes response.parsedAds — the ads parsed from the VAST response after schema validation and wrapper resolution — and response.statusCode. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

            • (string) --

              • (string) --

          • MethodType (string) --

            The HTTP method for the request to the VAST endpoint. Valid values: GET and POST. Use POST to send a bid request body, such as an OpenRTB payload.

          • RequestTimeoutMilliseconds (integer) --

            The maximum time, in milliseconds, that MediaTailor waits for a response from the VAST endpoint. The timeout covers the entire response, including any wrapper redirects that MediaTailor follows. If the call exceeds this timeout, MediaTailor proceeds with an empty ad list and continues output expression evaluation. Valid values: 100 to 2000.

          • Url (string) --

            An expression that evaluates to the VAST endpoint URL. Use {%...%} delimiters for dynamic expressions. A literal value must be an https:// URL. The expression can be up to 25,000 characters, and the URL after evaluation can be up to 2,048 characters.

          • Body (string) --

            An expression that evaluates to the request body, for example to send an OpenRTB bid request. The expression can be up to 100,000 characters, and the body after evaluation can be up to 64 KB.

          • Headers (dict) --

            A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound request. Headers beginning with X-Amz- are reserved by the service, and method override headers are not allowed.

            • (string) --

              • (string) --

        • Tags (dict) --

          The tags assigned to the function. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.

          • (string) --

            • (string) --

        • Arn (string) --

          The Amazon Resource Name (ARN) of the function.

    • NextToken (string) --

      Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.

      For the first ListFunctions request, omit this value. For subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request. Continue making requests until the response no longer includes a NextToken value, which indicates that all results have been retrieved.

PutFunction (updated) Link ¶
Changes (both)
{'AwsServiceRequestConfiguration': {'Body': 'string',
                                    'Headers': {'string': 'string'},
                                    'MethodType': 'GET | POST',
                                    'Output': {'string': 'string'},
                                    'RequestTimeoutMilliseconds': 'integer',
                                    'Runtime': 'JSONATA',
                                    'TargetRegion': 'string',
                                    'TargetService': 'string',
                                    'Url': 'string'},
 'FunctionType': {'AWS_SERVICE_REQUEST'}}

Creates or updates a function. A function defines reusable logic that MediaTailor executes at lifecycle hooks during ad insertion. For more information about functions, see Working with functions in the MediaTailor User Guide.

See also: AWS API Documentation

Request Syntax

client.put_function(
    FunctionId='string',
    FunctionType='HTTP_REQUEST'|'AWS_SERVICE_REQUEST'|'CUSTOM_OUTPUT'|'CONCURRENT_EXECUTOR'|'SEQUENTIAL_EXECUTOR'|'VAST_REQUEST',
    Description='string',
    HttpRequestConfiguration={
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'MethodType': 'GET'|'POST',
        'RequestTimeoutMilliseconds': 123,
        'Url': 'string',
        'Body': 'string',
        'Headers': {
            'string': 'string'
        }
    },
    AwsServiceRequestConfiguration={
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'MethodType': 'GET'|'POST',
        'RequestTimeoutMilliseconds': 123,
        'Url': 'string',
        'Body': 'string',
        'Headers': {
            'string': 'string'
        },
        'TargetService': 'string',
        'TargetRegion': 'string'
    },
    CustomOutputConfiguration={
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        }
    },
    ConcurrentExecutorConfiguration={
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'FunctionList': [
            {
                'RunCondition': 'string',
                'FunctionId': 'string',
                'Alias': 'string'
            },
        ],
        'TimeoutMilliseconds': 123,
        'MaxConcurrency': 123
    },
    SequentialExecutorConfiguration={
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'FunctionList': [
            {
                'RunCondition': 'string',
                'FunctionId': 'string',
                'Alias': 'string'
            },
        ],
        'TimeoutMilliseconds': 123
    },
    VastRequestConfiguration={
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'MethodType': 'GET'|'POST',
        'RequestTimeoutMilliseconds': 123,
        'Url': 'string',
        'Body': 'string',
        'Headers': {
            'string': 'string'
        }
    },
    Tags={
        'string': 'string'
    }
)
type FunctionId:

string

param FunctionId:

[REQUIRED]

The identifier of the function. The identifier must be unique within your account.

type FunctionType:

string

param FunctionType:

[REQUIRED]

The type of the function, which determines what the function can do at runtime. Valid values:

  • CUSTOM_OUTPUT – Evaluates expressions and produces output bindings with no external calls.

  • HTTP_REQUEST – Makes an HTTP call to an external service and evaluates output expressions that can reference the response.

  • AWS_SERVICE_REQUEST – Makes an authenticated request to a supported AWS service API and evaluates output expressions that can reference the response.

  • VAST_REQUEST – Calls a VAST endpoint, parses the response as VAST, and makes the parsed ads available to output expressions.

  • SEQUENTIAL_EXECUTOR – Runs a sequence of child functions in order, passing data between steps through temporary data.

  • CONCURRENT_EXECUTOR – Runs a set of child functions in parallel, up to a maximum concurrency, and combines their output when all functions complete.

For more information, see Function types and composition in the MediaTailor User Guide.

type Description:

string

param Description:

A description of the function.

type HttpRequestConfiguration:

dict

param HttpRequestConfiguration:

The configuration for an HTTP_REQUEST function. Specifies the HTTP method, URL, headers, body, timeout, and output expressions. Required when FunctionType is HTTP_REQUEST.

  • Runtime (string) -- [REQUIRED]

    The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

  • Output (dict) --

    A map of output bindings. Each key is a namespaced output path (such as player_params.device_type or temp.identity), and each value is an expression that MediaTailor evaluates at runtime. Output expressions in an HTTP_REQUEST function can reference the response object returned by the HTTP call. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

    • (string) --

      • (string) --

  • MethodType (string) -- [REQUIRED]

    The HTTP method for the request. Valid values: GET and POST.

  • RequestTimeoutMilliseconds (integer) -- [REQUIRED]

    The maximum time, in milliseconds, that MediaTailor waits for a response from the external service. If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values: 100 to 2000.

  • Url (string) -- [REQUIRED]

    An expression that evaluates to the request URL. Use {%...%} delimiters for dynamic expressions. The maximum length after evaluation is 2,048 characters.

  • Body (string) --

    An expression that evaluates to the request body. Used with POST requests. The maximum size after evaluation is 64 KB.

  • Headers (dict) --

    A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound HTTP request. Maximum 50 headers.

    • (string) --

      • (string) --

type AwsServiceRequestConfiguration:

dict

param AwsServiceRequestConfiguration:

The configuration for an AWS_SERVICE_REQUEST function. You must specify this parameter when FunctionType is AWS_SERVICE_REQUEST.

  • Runtime (string) -- [REQUIRED]

    The expression language used to evaluate expressions in the function configuration. The only supported value is JSONata.

  • Output (dict) --

    A map of output bindings. Each key is a namespaced output path, such as player_params.device_type. Each value is an expression that MediaTailor evaluates at runtime and can reference the response object from the target service. For more information, see JSONata expression reference in the MediaTailor User Guide.

    • (string) --

      • (string) --

  • MethodType (string) -- [REQUIRED]

    Specifies how the function sends the request to the target service. The value must match what the target service operation requires. Valid values:

    • GET – Retrieves data from the target service.

    • POST – Submits a request body to the target service.

  • RequestTimeoutMilliseconds (integer) -- [REQUIRED]

    The maximum time, in milliseconds, that MediaTailor waits for a response from the AWS service. If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values: 100 to 2000.

  • Url (string) -- [REQUIRED]

    An expression that evaluates to the endpoint URL for the target AWS service API operation. Use {%...%} delimiters for dynamic expressions. The URL must correspond to a valid endpoint for the service specified in TargetService. The maximum length after evaluation is 2,048 characters.

  • Body (string) --

    An expression that evaluates to the request body for the AWS service API call. The body must conform to the input format that the target service operation expects. Applies only when the target operation accepts a request body. The maximum size after evaluation is 64 KB.

  • Headers (dict) --

    A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound request to the AWS service. Use this to pass any headers required by the target service operation. You can include a maximum of 50 headers.

    • (string) --

      • (string) --

  • TargetService (string) -- [REQUIRED]

    The AWS service to call. Valid value: elemental-inference (AWS Elemental Inference).

  • TargetRegion (string) -- [REQUIRED]

    The AWS Region for the target service. Specify a static Region code (for example, us-east-1) or a JSONata expression that resolves to a Region code at runtime (for example, {%inference.region%}).

type CustomOutputConfiguration:

dict

param CustomOutputConfiguration:

The configuration for a CUSTOM_OUTPUT function. Specifies the runtime and output expressions. Required when FunctionType is CUSTOM_OUTPUT.

  • Runtime (string) -- [REQUIRED]

    The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

  • Output (dict) --

    A map of output bindings. Each key is a namespaced output path (such as player_params.device_type or temp.variant), and each value is an expression that MediaTailor evaluates at runtime against the current session state. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

    • (string) --

      • (string) --

type ConcurrentExecutorConfiguration:

dict

param ConcurrentExecutorConfiguration:

The configuration for a CONCURRENT_EXECUTOR function. Specifies the list of child functions to run in parallel, the maximum concurrency, an optional output block, and a timeout. Required when FunctionType is CONCURRENT_EXECUTOR.

  • Runtime (string) -- [REQUIRED]

    The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

  • Output (dict) -- [REQUIRED]

    A map of output bindings that controls which bindings the executor commits to the session state after all child functions complete. Each key is a namespaced output path, and each value is an expression that MediaTailor evaluates against the combined results of the child functions.

    • (string) --

      • (string) --

  • FunctionList (list) -- [REQUIRED]

    The list of child functions that MediaTailor runs in parallel. Each entry specifies a child function to execute and an optional run condition expression that controls whether the function runs.

    • (dict) --

      A reference to a child function within a SEQUENTIAL_EXECUTOR function.

      • RunCondition (string) --

        An optional expression that evaluates to a boolean. MediaTailor evaluates this expression immediately before running the step, using the accumulated state at that point in the sequence. If the expression evaluates to false, MediaTailor skips the step and moves to the next one. If omitted, the step always runs.

      • FunctionId (string) --

        The identifier of the child function to execute in this step.

      • Alias (string) --

        An optional alternate name for the function within the executor. If omitted, MediaTailor uses the function identifier.

  • TimeoutMilliseconds (integer) -- [REQUIRED]

    The maximum time, in milliseconds, for all child functions to complete. This timeout covers every function in the list, including any HTTP calls the child functions make. If the executor exceeds this timeout, MediaTailor discards all output from the executor and proceeds with default behavior.

  • MaxConcurrency (integer) -- [REQUIRED]

    The maximum number of child functions that MediaTailor runs simultaneously. When the list contains more functions than MaxConcurrency, MediaTailor starts additional functions as running ones complete, so that no more than MaxConcurrency functions run at the same time.

type SequentialExecutorConfiguration:

dict

param SequentialExecutorConfiguration:

The configuration for a SEQUENTIAL_EXECUTOR function. Specifies the ordered list of child functions to execute, an optional output block, and a timeout. Required when FunctionType is SEQUENTIAL_EXECUTOR.

  • Runtime (string) -- [REQUIRED]

    The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

  • Output (dict) --

    An optional map of output bindings that controls which bindings the sequence commits to the session state after all steps complete. If omitted, MediaTailor commits all accumulated output bindings from all child steps.

    • (string) --

      • (string) --

  • FunctionList (list) -- [REQUIRED]

    An ordered list of 1 to 10 steps. Each step specifies a child function to execute and an optional run condition expression that controls whether the step runs. MediaTailor executes steps in order, passing data between steps through temporary data.

    • (dict) --

      A reference to a child function within a SEQUENTIAL_EXECUTOR function.

      • RunCondition (string) --

        An optional expression that evaluates to a boolean. MediaTailor evaluates this expression immediately before running the step, using the accumulated state at that point in the sequence. If the expression evaluates to false, MediaTailor skips the step and moves to the next one. If omitted, the step always runs.

      • FunctionId (string) --

        The identifier of the child function to execute in this step.

      • Alias (string) --

        An optional alternate name for the function within the executor. If omitted, MediaTailor uses the function identifier.

  • TimeoutMilliseconds (integer) -- [REQUIRED]

    The maximum time, in milliseconds, for the entire sequence to complete. This timeout covers all steps, including any HTTP calls made by child functions. If the sequence exceeds this timeout, MediaTailor discards all output from the sequence and proceeds with default behavior.

type VastRequestConfiguration:

dict

param VastRequestConfiguration:

The configuration for a VAST_REQUEST function. Specifies the HTTP method, URL, headers, body, timeout, and output expressions. Required when FunctionType is VAST_REQUEST.

  • Runtime (string) -- [REQUIRED]

    The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

  • Output (dict) --

    A map of output bindings. Each key is a namespaced output path (such as temp.wrappedAds), and each value is an expression that MediaTailor evaluates at runtime. Output expressions in a VAST_REQUEST function can reference the response object, which exposes response.parsedAds — the ads parsed from the VAST response after schema validation and wrapper resolution — and response.statusCode. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

    • (string) --

      • (string) --

  • MethodType (string) -- [REQUIRED]

    The HTTP method for the request to the VAST endpoint. Valid values: GET and POST. Use POST to send a bid request body, such as an OpenRTB payload.

  • RequestTimeoutMilliseconds (integer) -- [REQUIRED]

    The maximum time, in milliseconds, that MediaTailor waits for a response from the VAST endpoint. The timeout covers the entire response, including any wrapper redirects that MediaTailor follows. If the call exceeds this timeout, MediaTailor proceeds with an empty ad list and continues output expression evaluation. Valid values: 100 to 2000.

  • Url (string) -- [REQUIRED]

    An expression that evaluates to the VAST endpoint URL. Use {%...%} delimiters for dynamic expressions. A literal value must be an https:// URL. The expression can be up to 25,000 characters, and the URL after evaluation can be up to 2,048 characters.

  • Body (string) --

    An expression that evaluates to the request body, for example to send an OpenRTB bid request. The expression can be up to 100,000 characters, and the body after evaluation can be up to 64 KB.

  • Headers (dict) --

    A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound request. Headers beginning with X-Amz- are reserved by the service, and method override headers are not allowed.

    • (string) --

      • (string) --

type Tags:

dict

param Tags:

The tags to assign to the function. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'FunctionId': 'string',
    'FunctionType': 'HTTP_REQUEST'|'AWS_SERVICE_REQUEST'|'CUSTOM_OUTPUT'|'CONCURRENT_EXECUTOR'|'SEQUENTIAL_EXECUTOR'|'VAST_REQUEST',
    'Description': 'string',
    'HttpRequestConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'MethodType': 'GET'|'POST',
        'RequestTimeoutMilliseconds': 123,
        'Url': 'string',
        'Body': 'string',
        'Headers': {
            'string': 'string'
        }
    },
    'AwsServiceRequestConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'MethodType': 'GET'|'POST',
        'RequestTimeoutMilliseconds': 123,
        'Url': 'string',
        'Body': 'string',
        'Headers': {
            'string': 'string'
        },
        'TargetService': 'string',
        'TargetRegion': 'string'
    },
    'CustomOutputConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        }
    },
    'ConcurrentExecutorConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'FunctionList': [
            {
                'RunCondition': 'string',
                'FunctionId': 'string',
                'Alias': 'string'
            },
        ],
        'TimeoutMilliseconds': 123,
        'MaxConcurrency': 123
    },
    'SequentialExecutorConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'FunctionList': [
            {
                'RunCondition': 'string',
                'FunctionId': 'string',
                'Alias': 'string'
            },
        ],
        'TimeoutMilliseconds': 123
    },
    'VastRequestConfiguration': {
        'Runtime': 'JSONATA',
        'Output': {
            'string': 'string'
        },
        'MethodType': 'GET'|'POST',
        'RequestTimeoutMilliseconds': 123,
        'Url': 'string',
        'Body': 'string',
        'Headers': {
            'string': 'string'
        }
    },
    'Tags': {
        'string': 'string'
    },
    'Arn': 'string'
}

Response Structure

  • (dict) --

    -- Define Mixin --

    • FunctionId (string) --

      The identifier of the function.

    • FunctionType (string) --

      The type of the function.

    • Description (string) --

      A description of the function.

    • HttpRequestConfiguration (dict) --

      The configuration for an HTTP_REQUEST function.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

      • Output (dict) --

        A map of output bindings. Each key is a namespaced output path (such as player_params.device_type or temp.identity), and each value is an expression that MediaTailor evaluates at runtime. Output expressions in an HTTP_REQUEST function can reference the response object returned by the HTTP call. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

        • (string) --

          • (string) --

      • MethodType (string) --

        The HTTP method for the request. Valid values: GET and POST.

      • RequestTimeoutMilliseconds (integer) --

        The maximum time, in milliseconds, that MediaTailor waits for a response from the external service. If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values: 100 to 2000.

      • Url (string) --

        An expression that evaluates to the request URL. Use {%...%} delimiters for dynamic expressions. The maximum length after evaluation is 2,048 characters.

      • Body (string) --

        An expression that evaluates to the request body. Used with POST requests. The maximum size after evaluation is 64 KB.

      • Headers (dict) --

        A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound HTTP request. Maximum 50 headers.

        • (string) --

          • (string) --

    • AwsServiceRequestConfiguration (dict) --

      The configuration for an AWS_SERVICE_REQUEST function. Specifies the target service, target Region, and request parameters.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. The only supported value is JSONata.

      • Output (dict) --

        A map of output bindings. Each key is a namespaced output path, such as player_params.device_type. Each value is an expression that MediaTailor evaluates at runtime and can reference the response object from the target service. For more information, see JSONata expression reference in the MediaTailor User Guide.

        • (string) --

          • (string) --

      • MethodType (string) --

        Specifies how the function sends the request to the target service. The value must match what the target service operation requires. Valid values:

        • GET – Retrieves data from the target service.

        • POST – Submits a request body to the target service.

      • RequestTimeoutMilliseconds (integer) --

        The maximum time, in milliseconds, that MediaTailor waits for a response from the AWS service. If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values: 100 to 2000.

      • Url (string) --

        An expression that evaluates to the endpoint URL for the target AWS service API operation. Use {%...%} delimiters for dynamic expressions. The URL must correspond to a valid endpoint for the service specified in TargetService. The maximum length after evaluation is 2,048 characters.

      • Body (string) --

        An expression that evaluates to the request body for the AWS service API call. The body must conform to the input format that the target service operation expects. Applies only when the target operation accepts a request body. The maximum size after evaluation is 64 KB.

      • Headers (dict) --

        A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound request to the AWS service. Use this to pass any headers required by the target service operation. You can include a maximum of 50 headers.

        • (string) --

          • (string) --

      • TargetService (string) --

        The AWS service to call. Valid value: elemental-inference (AWS Elemental Inference).

      • TargetRegion (string) --

        The AWS Region for the target service. Specify a static Region code (for example, us-east-1) or a JSONata expression that resolves to a Region code at runtime (for example, {%inference.region%}).

    • CustomOutputConfiguration (dict) --

      The configuration for a CUSTOM_OUTPUT function.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

      • Output (dict) --

        A map of output bindings. Each key is a namespaced output path (such as player_params.device_type or temp.variant), and each value is an expression that MediaTailor evaluates at runtime against the current session state. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

        • (string) --

          • (string) --

    • ConcurrentExecutorConfiguration (dict) --

      The configuration for a CONCURRENT_EXECUTOR function.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

      • Output (dict) --

        A map of output bindings that controls which bindings the executor commits to the session state after all child functions complete. Each key is a namespaced output path, and each value is an expression that MediaTailor evaluates against the combined results of the child functions.

        • (string) --

          • (string) --

      • FunctionList (list) --

        The list of child functions that MediaTailor runs in parallel. Each entry specifies a child function to execute and an optional run condition expression that controls whether the function runs.

        • (dict) --

          A reference to a child function within a SEQUENTIAL_EXECUTOR function.

          • RunCondition (string) --

            An optional expression that evaluates to a boolean. MediaTailor evaluates this expression immediately before running the step, using the accumulated state at that point in the sequence. If the expression evaluates to false, MediaTailor skips the step and moves to the next one. If omitted, the step always runs.

          • FunctionId (string) --

            The identifier of the child function to execute in this step.

          • Alias (string) --

            An optional alternate name for the function within the executor. If omitted, MediaTailor uses the function identifier.

      • TimeoutMilliseconds (integer) --

        The maximum time, in milliseconds, for all child functions to complete. This timeout covers every function in the list, including any HTTP calls the child functions make. If the executor exceeds this timeout, MediaTailor discards all output from the executor and proceeds with default behavior.

      • MaxConcurrency (integer) --

        The maximum number of child functions that MediaTailor runs simultaneously. When the list contains more functions than MaxConcurrency, MediaTailor starts additional functions as running ones complete, so that no more than MaxConcurrency functions run at the same time.

    • SequentialExecutorConfiguration (dict) --

      The configuration for a SEQUENTIAL_EXECUTOR function.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

      • Output (dict) --

        An optional map of output bindings that controls which bindings the sequence commits to the session state after all steps complete. If omitted, MediaTailor commits all accumulated output bindings from all child steps.

        • (string) --

          • (string) --

      • FunctionList (list) --

        An ordered list of 1 to 10 steps. Each step specifies a child function to execute and an optional run condition expression that controls whether the step runs. MediaTailor executes steps in order, passing data between steps through temporary data.

        • (dict) --

          A reference to a child function within a SEQUENTIAL_EXECUTOR function.

          • RunCondition (string) --

            An optional expression that evaluates to a boolean. MediaTailor evaluates this expression immediately before running the step, using the accumulated state at that point in the sequence. If the expression evaluates to false, MediaTailor skips the step and moves to the next one. If omitted, the step always runs.

          • FunctionId (string) --

            The identifier of the child function to execute in this step.

          • Alias (string) --

            An optional alternate name for the function within the executor. If omitted, MediaTailor uses the function identifier.

      • TimeoutMilliseconds (integer) --

        The maximum time, in milliseconds, for the entire sequence to complete. This timeout covers all steps, including any HTTP calls made by child functions. If the sequence exceeds this timeout, MediaTailor discards all output from the sequence and proceeds with default behavior.

    • VastRequestConfiguration (dict) --

      The configuration for a VAST_REQUEST function.

      • Runtime (string) --

        The expression language used to evaluate expressions in the function configuration. Set this to JSONata.

      • Output (dict) --

        A map of output bindings. Each key is a namespaced output path (such as temp.wrappedAds), and each value is an expression that MediaTailor evaluates at runtime. Output expressions in a VAST_REQUEST function can reference the response object, which exposes response.parsedAds — the ads parsed from the VAST response after schema validation and wrapper resolution — and response.statusCode. For more information about expression syntax, see JSONata expression reference in the MediaTailor User Guide.

        • (string) --

          • (string) --

      • MethodType (string) --

        The HTTP method for the request to the VAST endpoint. Valid values: GET and POST. Use POST to send a bid request body, such as an OpenRTB payload.

      • RequestTimeoutMilliseconds (integer) --

        The maximum time, in milliseconds, that MediaTailor waits for a response from the VAST endpoint. The timeout covers the entire response, including any wrapper redirects that MediaTailor follows. If the call exceeds this timeout, MediaTailor proceeds with an empty ad list and continues output expression evaluation. Valid values: 100 to 2000.

      • Url (string) --

        An expression that evaluates to the VAST endpoint URL. Use {%...%} delimiters for dynamic expressions. A literal value must be an https:// URL. The expression can be up to 25,000 characters, and the URL after evaluation can be up to 2,048 characters.

      • Body (string) --

        An expression that evaluates to the request body, for example to send an OpenRTB bid request. The expression can be up to 100,000 characters, and the body after evaluation can be up to 64 KB.

      • Headers (dict) --

        A map of HTTP header names to expression values. MediaTailor evaluates each header value expression at runtime and includes the result in the outbound request. Headers beginning with X-Amz- are reserved by the service, and method override headers are not allowed.

        • (string) --

          • (string) --

    • Tags (dict) --

      The tags assigned to the function. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.

      • (string) --

        • (string) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the function.