Skip to content

Struct star::S3EndpointConfig

ClassList > star > S3EndpointConfig

S3 endpoint resolution (default AWS, or an override for S3-compatible services such as MinIO and for local testing). More...

  • #include <stards.h>

Public Attributes

Type Name
std::string endpoint
bool path_style = false
bool use_https = true

Public Functions

Type Name
std::string canonical_uri (const std::string & bucket, const std::string & encoded_key) const
std::string host (const std::string & bucket, const std::string & region) const
std::string url (const std::string & bucket, const std::string & region, const std::string & encoded_key) const

Public Static Functions

Type Name
bool env_is_false (const char * name)
S3EndpointConfig resolve ()

Detailed Description

Controlled by environment variables (GDAL-compatible names): * AWS_S3_ENDPOINT host[:port] to use instead of s3.<region>.amazonaws.com * AWS_VIRTUAL_HOSTING "FALSE"/"NO" -> path-style (endpoint/bucket/key); otherwise virtual-hosted (bucket.endpoint/key) * AWS_HTTPS "NO"/"FALSE" -> http:// scheme (default https://)

With none set, behavior is byte-identical to the historical "https://<bucket>.s3.<region>.amazonaws.com/<key>" (virtual-hosted, https).

IMPORTANT: the SigV4 host header must equal the actual connection host (including any :port) AND the signed canonical URI must equal the URL path, so host(), url(), and canonical_uri() are all derived here to stay consistent.

Public Attributes Documentation

variable endpoint

std::string star::S3EndpointConfig::endpoint;

variable path_style

bool star::S3EndpointConfig::path_style;

variable use_https

bool star::S3EndpointConfig::use_https;

Public Functions Documentation

function canonical_uri

inline std::string star::S3EndpointConfig::canonical_uri (
    const std::string & bucket,
    const std::string & encoded_key
) const

function host

inline std::string star::S3EndpointConfig::host (
    const std::string & bucket,
    const std::string & region
) const

function url

inline std::string star::S3EndpointConfig::url (
    const std::string & bucket,
    const std::string & region,
    const std::string & encoded_key
) const

Public Static Functions Documentation

function env_is_false

static inline bool star::S3EndpointConfig::env_is_false (
    const char * name
) 

function resolve

static inline S3EndpointConfig star::S3EndpointConfig::resolve () 


The documentation for this class was generated from the following file StarDS/include/stards.h