package awsm-codegen

  1. Overview
  2. Docs

Types representing content of botocore/data/endpoints.json. Type t represents the full file.

When posting a request, an AWS client has to determine the exact URI the request has to be sent to. This depends on the targeted service and the region. The rules are not systematically provided by Amazon, but botocore provides an endpoints.json file with a set of heuristic rules that can be used to determine a proper endpoint for a request.

type credentialScope = {
  1. region : Region.t option;
  2. service : string option;
}
val sexp_of_credentialScope : credentialScope -> Sexplib0.Sexp.t
val credentialScope_of_sexp : Sexplib0.Sexp.t -> credentialScope
type uri_token = [
  1. | `String_token of string
  2. | `Service_token
  3. | `Region_token
  4. | `DnsSuffix_token
]
val sexp_of_uri_token : uri_token -> Sexplib0.Sexp.t
val uri_token_of_sexp : Sexplib0.Sexp.t -> uri_token
val __uri_token_of_sexp__ : Sexplib0.Sexp.t -> uri_token
type uri_pattern = uri_token list
val sexp_of_uri_pattern : uri_pattern -> Sexplib0.Sexp.t
val uri_pattern_of_sexp : Sexplib0.Sexp.t -> uri_pattern
type variant = {
  1. dnsSuffix : string option;
  2. hostname : uri_pattern option;
  3. tags : string list;
}
val sexp_of_variant : variant -> Sexplib0.Sexp.t
val variant_of_sexp : Sexplib0.Sexp.t -> variant
type properties = {
  1. credentialScope : credentialScope option;
  2. hostname : uri_pattern option;
  3. protocols : string list option;
  4. sslCommonName : string option;
  5. signatureVersions : [ `v2 | `v3 | `v4 | `s3 | `s3v4 ] list option;
  6. variants : variant list option;
  7. deprecated : bool option;
}
val sexp_of_properties : properties -> Sexplib0.Sexp.t
val properties_of_sexp : Sexplib0.Sexp.t -> properties
type service = {
  1. defaults : properties option;
  2. endpoints : (string * properties) list;
  3. isRegionalized : bool option;
  4. partitionEndpoint : string option;
}
val sexp_of_service : service -> Sexplib0.Sexp.t
val service_of_sexp : Sexplib0.Sexp.t -> service
type region = {
  1. description : string;
}
val sexp_of_region : region -> Sexplib0.Sexp.t
val region_of_sexp : Sexplib0.Sexp.t -> region
type partition = {
  1. defaults : properties option;
  2. dnsSuffix : string;
  3. partition : string;
  4. partitionName : string;
  5. regionRegex : string;
  6. regions : (string * region) list;
  7. services : (string * service) list;
}
val sexp_of_partition : partition -> Sexplib0.Sexp.t
val partition_of_sexp : Sexplib0.Sexp.t -> partition
type t = {
  1. partitions : partition list;
  2. version : int;
}
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val of_json : string -> t
val make_lookup_uri : t -> Ppxlib.structure_item

make_lookup_uri e generates a module implementation for endpoint heuristics, which are rules described in botodata to determine an endpoint (service URL, basically) for a service given a region and a few more properties.

val make_lookup_credential_scope : t -> Ppxlib.structure_item

make_lookup_credential_scope e is similar to the above, but determines the region credentials should be bound to, though most of the time it's the same as the region of the service. One notable exception is route53.

OCaml

Innovation. Community. Security.