Skip to content
v2.278.0

VastRequestConfigurationProperty Struct ​

The configuration for a VAST_REQUEST function.

Specifies the HTTP method, URL, headers, body, timeout, and output expressions for a request to a VAST endpoint. MediaTailor parses the response as VAST and resolves wrapper redirects, then makes the parsed ads available to the function's output expressions. For more information, see Function types and composition (https://docs.aws.amazon.com/mediatailor/latest/ug/monetization-functions-types.html) in the MediaTailor User Guide.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_mediatailor as mediatailor } from 'aws-cdk-lib';
const vastRequestConfigurationProperty: mediatailor.CfnFunction.VastRequestConfigurationProperty = {
  methodType: 'methodType',
  requestTimeoutMilliseconds: 123,
  runtime: 'runtime',
  url: 'url',

  // the properties below are optional
  body: 'body',
  cache: {
    ttlMaximumSeconds: 123,
    ttlMinimumSeconds: 123,

    // the properties below are optional
    key: 'key',
  },
  headers: {
    headersKey: 'headers',
  },
  output: {
    outputKey: 'output',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_mediatailor as mediatailor

vast_request_configuration_property = mediatailor.CfnFunction.VastRequestConfigurationProperty(
    method_type="methodType",
    request_timeout_milliseconds=123,
    runtime="runtime",
    url="url",

    # the properties below are optional
    body="body",
    cache=mediatailor.CfnFunction.HttpRequestCacheConfigurationProperty(
        ttl_maximum_seconds=123,
        ttl_minimum_seconds=123,

        # the properties below are optional
        key="key"
    ),
    headers={
        "headers_key": "headers"
    },
    output={
        "output_key": "output"
    }
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.mediatailor.*;

VastRequestConfigurationProperty vastRequestConfigurationProperty = VastRequestConfigurationProperty.builder()
        .methodType("methodType")
        .requestTimeoutMilliseconds(123)
        .runtime("runtime")
        .url("url")

        // the properties below are optional
        .body("body")
        .cache(HttpRequestCacheConfigurationProperty.builder()
                .ttlMaximumSeconds(123)
                .ttlMinimumSeconds(123)

                // the properties below are optional
                .key("key")
                .build())
        .headers(Map.of(
                "headersKey", "headers"))
        .output(Map.of(
                "outputKey", "output"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MediaTailor;

var vastRequestConfigurationProperty = new VastRequestConfigurationProperty {
    MethodType = "methodType",
    RequestTimeoutMilliseconds = 123,
    Runtime = "runtime",
    Url = "url",

    // the properties below are optional
    Body = "body",
    Cache = new HttpRequestCacheConfigurationProperty {
        TtlMaximumSeconds = 123,
        TtlMinimumSeconds = 123,

        // the properties below are optional
        Key = "key"
    },
    Headers = new Dictionary<string, string> {
        { "headersKey", "headers" }
    },
    Output = new Dictionary<string, string> {
        { "outputKey", "output" }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

vastRequestConfigurationProperty := &VastRequestConfigurationProperty{
	MethodType: jsii.String("methodType"),
	RequestTimeoutMilliseconds: jsii.Number(123),
	Runtime: jsii.String("runtime"),
	Url: jsii.String("url"),

	// the properties below are optional
	Body: jsii.String("body"),
	Cache: &HttpRequestCacheConfigurationProperty{
		TtlMaximumSeconds: jsii.Number(123),
		TtlMinimumSeconds: jsii.Number(123),

		// the properties below are optional
		Key: jsii.String("key"),
	},
	Headers: map[string]*string{
		"headersKey": jsii.String("headers"),
	},
	Output: map[string]*string{
		"outputKey": jsii.String("output"),
	},
}

Properties ​

bodyoptionalstringbodyoptionalstrbodyoptionalStringBodyoptionalstringBodyoptional*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.

cacheoptionalIResolvable | CfnFunction.HttpRequestCacheConfigurationPropertycacheoptionaltyping.Union[IResolvable, HttpRequestCacheConfigurationProperty]cacheoptionalIResolvableCacheoptionalIResolvableCacheoptionalinterface{} #
The optional response-caching configuration shared by the HTTP-based function types (HTTP_REQUEST, AWS_SERVICE_REQUEST, and VAST_REQUEST).
notes

When you provide this configuration, MediaTailor caches function responses with HTTP status codes 200, 203, 204, 404, 405, 410, 414, or 501. For a cacheable response, MediaTailor uses the Cache-Control max-age directive limited to the range between TtlMinimumSeconds and TtlMaximumSeconds. If no max-age directive is present, MediaTailor uses TtlMinimumSeconds. Cached HTTP responses are scoped per playback configuration, not per function.

headersoptionalIResolvable | { [key: string]: string }headersoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]headersoptionalIResolvableHeadersoptionalIResolvableHeadersoptionalinterface{} #
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.

methodTypestringmethod_typestrmethodTypeStringMethodTypestringMethodType*string required #
outputoptionalIResolvable | { [key: string]: string }outputoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]outputoptionalIResolvableOutputoptionalIResolvableOutputoptionalinterface{} #
A map of output bindings.
notes

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 (https://docs.aws.amazon.com/mediatailor/latest/ug/monetization-functions-jsonata.html) in the MediaTailor User Guide.

requestTimeoutMillisecondsnumberrequest_timeout_millisecondsint | floatrequestTimeoutMillisecondsNumberRequestTimeoutMillisecondsdoubleRequestTimeoutMilliseconds*float64 required #
The maximum time, in milliseconds, that MediaTailor waits for a response from the VAST endpoint.
notes

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 are 100 to 2000.

runtimestringruntimestrruntimeStringRuntimestringRuntime*string required #
The expression language used to evaluate expressions in the function configuration.

Set this to JSONATA.

urlstringurlstrurlStringUrlstringUrl*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.