Module Values.TestFunctionRequestSource

Tests a CloudFront function. To test a function, you provide an event object that represents an HTTP request or response that your CloudFront distribution could receive in production. CloudFront runs the function, passing it the event object that you provided, and returns the function's result (the modified event object) in the response. The response also contains function logs and error messages, if any exist. For more information about testing functions, see Testing functions in the Amazon CloudFront Developer Guide. To test a function, you provide the function's name and version (ETag value) along with the event object. To get the function's name and version, you can use ListFunctions and DescribeFunction.

Sourcetype nonrec t = {
  1. name : FunctionName.t;
    (*

    The name of the function that you are testing.

    *)
  2. ifMatch : String_.t;
    (*

    The current version (ETag value) of the function that you are testing, which you can get using DescribeFunction.

    *)
  3. stage : FunctionStage.t option;
    (*

    The stage of the function that you are testing, either DEVELOPMENT or LIVE.

    *)
  4. eventObject : FunctionEventObject.t;
    (*

    The event object to test the function with. For more information about the structure of the event object, see Testing functions in the Amazon CloudFront Developer Guide.

    *)
}
Sourceval context_ : string
Sourceval make : ?stage:??? -> name:FunctionName.t -> ifMatch:String_.t -> eventObject:FunctionEventObject.t -> unit -> t
Sourceval to_value : t -> [> `Structure of (string * [> `Blob of FunctionEventObject.t | `Enum of string | `String of FunctionName.t ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t