Module Awskit_s3.Endpoint_resolver

S3 endpoint and addressing resolution.

Most application code should pass endpoint options to an adapter create function or to Awskit_s3.Presigned. This module is exposed so custom runtimes can use the same endpoint configuration type as Awskit_s3.Make.

type addressing_style = Endpoint_config.addressing_style

Requested bucket addressing style.

For object key exactly "soap", `Auto selects path-style addressing because AWS S3 does not support that key with virtual-hosted-style requests. Explicit `Virtual_hosted resolution rejects that key with a validation error instead of generating an invalid request.

type endpoint_variant = Endpoint_config.endpoint_variant

AWS S3 endpoint variant.

type resolved_style = [
  1. | `Path
  2. | `Virtual_hosted
]

Concrete addressing style selected for one request.

module Request : sig ... end

S3 endpoint configuration.

val default : t

Default AWS S3 regional HTTPS endpoint configuration.

val addressing_style : t -> addressing_style

Return the configured addressing-style preference.

val endpoint_variant : t -> endpoint_variant option

Return the configured AWS endpoint variant, if this is an AWS endpoint policy.

val endpoint : t -> region:Awskit.Region.t -> (Awskit.Endpoint.t, Awskit.Error.t) Stdlib.result

Resolve the base S3 endpoint for a region.

val resolve_bucket_request : t -> region:Awskit.Region.t -> bucket:Bucket_name.t -> suffix:string -> signing_suffix:string -> (Request.t, Awskit.Error.t) Stdlib.result

Resolve endpoint, transport path, and signing path for a bucket-level request.

val resolve_object_request : t -> region:Awskit.Region.t -> bucket:Bucket_name.t -> key:Object_key.t -> (Request.t, Awskit.Error.t) Stdlib.result

Resolve endpoint, transport path, and signing path for an object request.

Object key exactly "soap" is resolved with path-style addressing when the configuration is `Auto or `Path. It is rejected for explicit `Virtual_hosted addressing.