Skip to content

AwsServiceRequestConfiguration

Source code in docs_src/capo_mediatailor/types/aws_service_request_configuration.py
class AwsServiceRequestConfiguration(TypedDict, closed=True):
    runtime: "capo_mediatailor.types.runtime_type.RuntimeType"
    """<p>The expression language used to evaluate expressions in the function configuration. The only supported value is <code>JSONata</code>.</p>"""
    output: NotRequired["capo_mediatailor.types.__map_of__string.__mapOf__string"]
    """<p>A map of output bindings. Each key is a namespaced output path, such as <code>player_params.device_type</code>. Each value is an expression that MediaTailor evaluates at runtime and can reference the <code>response</code> object from the target service. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/monetization-functions-jsonata.html">JSONata expression reference</a> in the <i>MediaTailor User Guide</i>.</p>"""
    method_type: "capo_mediatailor.types.method_type.MethodType"
    """<p>Specifies how the function sends the request to the target service. The value must match what the target service operation requires. Valid values:</p> <ul> <li> <p> <code>GET</code> – Retrieves data from the target service.</p> </li> <li> <p> <code>POST</code> – Submits a request body to the target service.</p> </li> </ul>"""
    request_timeout_milliseconds: "capo_mediatailor.types.__integer.__integer"
    """<p>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 <code>null</code> and proceeds with output expression evaluation. Valid values: <code>100</code> to <code>2000</code>.</p>"""
    url: "capo_mediatailor.types.__string.__string"
    """<p>An expression that evaluates to the endpoint URL for the target AWS service API operation. Use <code>{%...%}</code> delimiters for dynamic expressions. The URL must correspond to a valid endpoint for the service specified in <code>TargetService</code>. The maximum length after evaluation is 2,048 characters.</p>"""
    body: NotRequired["capo_mediatailor.types.__string.__string"]
    """<p>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.</p>"""
    headers: NotRequired["capo_mediatailor.types.__map_of__string.__mapOf__string"]
    """<p>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.</p>"""
    cache: NotRequired[
        "capo_mediatailor.types.http_request_cache_configuration.HttpRequestCacheConfiguration"
    ]
    """<p>The optional response-caching configuration for the function. When present, MediaTailor caches the responses that the function receives from the AWS service, within the time-to-live (TTL) bounds that you specify. Omit this configuration to disable response caching.</p>"""
    target_service: "capo_mediatailor.types.aws_target_service.AwsTargetService"
    """<p>The AWS service to call. Valid value: <code>elemental-inference</code> (AWS Elemental Inference).</p>"""
    target_region: "capo_mediatailor.types.__string.__string"
    """<p>The AWS Region for the target service. Specify a static Region code (for example, <code>us-east-1</code>) or a JSONata expression that resolves to a Region code at runtime (for example, <code>{%inference.region%}</code>).</p>"""

body instance-attribute

body: NotRequired[__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.

cache instance-attribute

cache: NotRequired[HttpRequestCacheConfiguration]

The optional response-caching configuration for the function. When present, MediaTailor caches the responses that the function receives from the AWS service, within the time-to-live (TTL) bounds that you specify. Omit this configuration to disable response caching.

headers instance-attribute

headers: NotRequired[__mapOf__string]

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.

method_type instance-attribute

method_type: MethodType

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.

output instance-attribute

output: NotRequired[__mapOf__string]

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.

request_timeout_milliseconds instance-attribute

request_timeout_milliseconds: __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.

runtime instance-attribute

runtime: RuntimeType

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

target_region instance-attribute

target_region: __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%}).

target_service instance-attribute

target_service: AwsTargetService

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

url instance-attribute

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.