AwsServiceRequestConfigurationProperty Struct
The configuration for an AWS_SERVICE_REQUEST function.
Contains the target service, target Region, and request parameters that the function uses to call an AWS service API. For more information, see AWS_SERVICE_REQUEST (https://docs.aws.amazon.com/mediatailor/latest/ug/monetization-functions-types-aws-service-request.html) in the MediaTailor User Guide.
| Source | |
|---|---|
| Type last changed |
Example
// 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 awsServiceRequestConfigurationProperty: mediatailor.CfnFunction.AwsServiceRequestConfigurationProperty = {
methodType: 'methodType',
requestTimeoutMilliseconds: 123,
runtime: 'runtime',
targetRegion: 'targetRegion',
targetService: 'targetService',
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',
},
};
# 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
aws_service_request_configuration_property = mediatailor.CfnFunction.AwsServiceRequestConfigurationProperty(
method_type="methodType",
request_timeout_milliseconds=123,
runtime="runtime",
target_region="targetRegion",
target_service="targetService",
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"
}
)
// 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.*;
AwsServiceRequestConfigurationProperty awsServiceRequestConfigurationProperty = AwsServiceRequestConfigurationProperty.builder()
.methodType("methodType")
.requestTimeoutMilliseconds(123)
.runtime("runtime")
.targetRegion("targetRegion")
.targetService("targetService")
.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();
// 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 awsServiceRequestConfigurationProperty = new AwsServiceRequestConfigurationProperty {
MethodType = "methodType",
RequestTimeoutMilliseconds = 123,
Runtime = "runtime",
TargetRegion = "targetRegion",
TargetService = "targetService",
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" }
}
};
// 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"
awsServiceRequestConfigurationProperty := &AwsServiceRequestConfigurationProperty{
MethodType: jsii.String("methodType"),
RequestTimeoutMilliseconds: jsii.Number(123),
Runtime: jsii.String("runtime"),
TargetRegion: jsii.String("targetRegion"),
TargetService: jsii.String("targetService"),
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
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.
cacheoptionalIResolvable | CfnFunction.cacheoptionaltyping.Union[IResolvable, HttpRequestCacheConfigurationProperty]cacheoptionalIResolvableCacheoptionalIResolvableCacheoptionalinterface{} #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{} #notes
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.
outputoptionalIResolvable | { [key: string]: string }outputoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]outputoptionalIResolvableOutputoptionalIResolvableOutputoptionalinterface{} #notes
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 (https://docs.aws.amazon.com/mediatailor/latest/ug/monetization-functions-jsonata.html) in the MediaTailor User Guide.
requestTimeoutMillisecondsnumberrequest_timeout_millisecondsint | floatrequestTimeoutMillisecondsNumberRequestTimeoutMillisecondsdoubleRequestTimeoutMilliseconds*float64 required #If the call exceeds this timeout, MediaTailor sets the response status code to null and proceeds with output expression evaluation. Valid values are 100 to 2000.
Set this to JSONATA.
targetRegionstringtarget_regionstrtargetRegionStringTargetRegionstringTargetRegion*string required #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%}).
targetServicestringtarget_servicestrtargetServiceStringTargetServicestringTargetService*string required #Valid value: elemental-inference (AWS Elemental Inference).
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.