package awskit

  1. Overview
  2. Docs

Module Awskit.EndpointSource

AWS service endpoint configuration.

AWS service endpoint.

Endpoint values are pure configuration. Runtime adapters use them when constructing transport requests.

Sourcemodule Scheme : sig ... end
Sourcetype t

Parsed endpoint without a path. Use request targets for service-specific paths and query strings.

Sourceval pp : Format.formatter -> t -> unit
Sourceval equal : t -> t -> bool
Sourceval create : scheme:Scheme.t -> host:string -> ?port:int -> unit -> (t, Error.t) result

Create an endpoint from structured parts. host must be non-empty and must not include a scheme, path, or port.

Sourceval create_exn : scheme:Scheme.t -> host:string -> ?port:int -> unit -> t

Like create, but raises Invalid_argument on validation failure.

Sourceval of_string : string -> (t, Error.t) result

Parse an http:// or https:// endpoint URL. Paths and queries are not accepted because service packages construct those per request.

Sourceval of_string_exn : string -> t

Like of_string, but raises Invalid_argument on validation failure.

Sourceval http : host:string -> ?port:int -> unit -> (t, Error.t) result

Create an HTTP endpoint.

Sourceval http_exn : host:string -> ?port:int -> unit -> t
Sourceval https : host:string -> ?port:int -> unit -> (t, Error.t) result

Create an HTTPS endpoint.

Sourceval https_exn : host:string -> ?port:int -> unit -> t
Sourceval scheme : t -> Scheme.t
Sourceval host : t -> string
Sourceval port : t -> int option
Sourceval authority : t -> string

Host plus optional port, suitable for the HTTP Host header.

Sourceval to_url_prefix : t -> string

Render scheme://authority without a trailing slash.