AwsServiceRequestConfigurationProperty Struct Added in v2.273.0
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.
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',
headers: {
headersKey: 'headers',
},
output: {
outputKey: '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.
headersIResolvable | { [key: string]: string }headerstyping.Union[IResolvable, typing.Mapping[str, str]]headersIResolvableHeadersIResolvableHeadersinterface{}#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.
outputIResolvable | { [key: string]: string }outputtyping.Union[IResolvable, typing.Mapping[str, str]]outputIResolvableOutputIResolvableOutputinterface{}#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*float64required#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.
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*stringrequired#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.