package aws

  1. Overview
  2. Docs

Module type Aws.CallSource

All AWS api operations should have type Call. Runtime implementation should take as input modules of type Call.

Sourcetype input

The native OCaml datatype input to the Call.

Sourcetype output

The native OCaml datatype that is produced as output to a successful Call.

Sourcetype error

The native OCaml error type. This is shared between all calls for a single API.

Sourceval signature_version : Request.signature_version

The signing method to use for the Call.

Sourceval service : string

The AWS service, for example, 'ec2'. This is used for request signing, and to determine the endpoint to send the request.

Sourceval to_http : string -> string -> input -> Request.t

This function converts the native input into the HTTP request type. In particular, it is responsible for properly encoding the request type into query format. It also sets the Action and Version query parameters.

Sourceval of_http : string -> [ `Ok of output | `Error of error Error.error_response ]

This function converts from a HTTP response body to an output or an error if the response could not be decoded.

Sourceval parse_error : int -> string -> error option

This function parses an AWS error (which has been successfully deserialized from XML) into an API specific native error that could have been triggered by this call. It should fail to parse if the error it is given is not one of those listen in the specification, or if the passed HTTP status code does not match the specified one.

OCaml

Innovation. Community. Security.