MediaTailor / Client / list_functions

list_functions

MediaTailor.Client.list_functions(**kwargs)

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

response = client.list_functions(
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • MaxResults (integer) –

    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.

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

Return type:

dict

Returns:

Response Syntax

{
    'Items': [
        {
            'FunctionId': 'string',
            'FunctionType': 'HTTP_REQUEST'|'CUSTOM_OUTPUT'|'SEQUENTIAL_EXECUTOR',
            'Description': 'string',
            'HttpRequestConfiguration': {
                'Runtime': 'JSONATA',
                'Output': {
                    'string': 'string'
                },
                'MethodType': 'GET'|'POST',
                'RequestTimeoutMilliseconds': 123,
                'Url': 'string',
                'Body': 'string',
                'Headers': {
                    'string': 'string'
                }
            },
            'CustomOutputConfiguration': {
                'Runtime': 'JSONATA',
                'Output': {
                    'string': 'string'
                }
            },
            'SequentialExecutorConfiguration': {
                'Runtime': 'JSONATA',
                'Output': {
                    'string': 'string'
                },
                'FunctionList': [
                    {
                        'RunCondition': 'string',
                        'FunctionId': 'string'
                    },
                ],
                'TimeoutMilliseconds': 123
            },
            '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) –

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

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

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

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

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