Module Values.TestFunctionResultSource

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. testResult : TestResult.t option;
    (*

    An object that represents the result of running the function with the provided event object.

    *)
}
Sourcetype nonrec error = [
  1. | `InvalidArgument of InvalidArgument.t
  2. | `InvalidIfMatchVersion of InvalidIfMatchVersion.t
  3. | `NoSuchFunctionExists of NoSuchFunctionExists.t
  4. | `TestFunctionFailed of TestFunctionFailed.t
  5. | `UnsupportedOperation of UnsupportedOperation.t
  6. | `Unknown_operation_error of string * string option
]
Sourceval make : ?testResult:??? -> unit -> t
Sourceval error_of_json : string -> Yojson.Safe.t -> [> `InvalidArgument of InvalidArgument.t | `InvalidIfMatchVersion of InvalidIfMatchVersion.t | `NoSuchFunctionExists of NoSuchFunctionExists.t | `TestFunctionFailed of TestFunctionFailed.t | `Unknown_operation_error of string * string option | `UnsupportedOperation of UnsupportedOperation.t ]
Sourceval error_of_xml : string -> Awso.Xml.t -> [> `InvalidArgument of InvalidArgument.t | `InvalidIfMatchVersion of InvalidIfMatchVersion.t | `NoSuchFunctionExists of NoSuchFunctionExists.t | `TestFunctionFailed of TestFunctionFailed.t | `Unknown_operation_error of string * string option | `UnsupportedOperation of UnsupportedOperation.t ]
Sourceval error_to_json : error -> Yojson.Safe.t
Sourceval of_header_and_body : ('a * TestResult.t) -> t
Sourceval to_value : t -> [> `Structure of (string * [> `Structure of (string * [> `List of [> `String of String_.t ] list | `String of String_.t | `Structure of (string * [> `String of FunctionName.t | `Structure of (string * [> `Enum of string | `String of String_.t | `Structure of (string * [> `Integer of Integer.t | `List of [> `Structure of (string * [> `String of KeyValueStoreARN.t ]) list ] list ]) list | `Timestamp of Timestamp.t ]) list ]) list ]) list ]) 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