Skip to content
v2.278.0

HttpRequestConfigurationProperty Struct ​

Configuration for HTTP request functions.

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 httpRequestConfigurationProperty: mediatailor.CfnFunction.HttpRequestConfigurationProperty = {
  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

http_request_configuration_property = mediatailor.CfnFunction.HttpRequestConfigurationProperty(
    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.*;

HttpRequestConfigurationProperty httpRequestConfigurationProperty = HttpRequestConfigurationProperty.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 httpRequestConfigurationProperty = new HttpRequestConfigurationProperty {
    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"

httpRequestConfigurationProperty := &HttpRequestConfigurationProperty{
	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 #
The body of the HTTP request.
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{} #
methodTypestringmethod_typestrmethodTypeStringMethodTypestringMethodType*string required #
outputoptionalIResolvable | { [key: string]: string }outputoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]outputoptionalIResolvableOutputoptionalIResolvableOutputoptionalinterface{} #
requestTimeoutMillisecondsnumberrequest_timeout_millisecondsint | floatrequestTimeoutMillisecondsNumberRequestTimeoutMillisecondsdoubleRequestTimeoutMilliseconds*float64 required #
The timeout in milliseconds for the HTTP request.

Maximum value is 2000.

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

Set this to JSONATA.

urlstringurlstrurlStringUrlstringUrl*string required #
The URL endpoint for the HTTP request.