Struct aws_sdk_rust::aws::s3::endpoint::Endpoint [] [src]

pub struct Endpoint {
    pub region: Region,
    pub signature: Signature,
    pub endpoint: Option<Url>,
    pub proxy: Option<Url>,
    pub user_agent: Option<String>,
    pub is_bucket_virtual: bool,
}

Endpoint allows you to set a custom endpoint and/or a proxy for a given region and associate this as an endpoint of where S3Client will look for the data.

NB: Endpoint is not JSON encodable/decodable without implementing a custom to_json trait because of third party Url struct.

Fields

Specify the specific Region you're targeting the request towards. The default is: Region::UsEast1. This value should be Region::UsEast1 for third party services since some do not use Region information for their Endpoint.

Signature is an enum of V2 or V4. Specify Signature::V2 or Signature::V4. See notes below.

Uses Url crate. AWS has a fixed set of Endpoints. However, third party services also need to be covered so adding an option for the Endpoint solves that requirement. If using AWS then it will default to the given Endpoint for the specified Region.

Important: Proxies are used by most Enterprises. You can specify your proxy with the port in the following format https://:. Also, it honors the http_proxy, https_proxy and no_proxy environment variables if present. However, manually setting the value takes precedent.

User-Agent. It lives in Endpoint since you may want a different User-Agent for Endpoint. This value is an Option which can be None.

is_bucket_virtual defautls to true but can be overridden for those cases where the older style is required. This is useful in situations where you may be testing on one load balancer and running something like Ceph RGW with virtual buckets enabled but the new load balancer and VIP range are unable to represent a virtual bucket due to configs in Ceph RGW DNS.

Methods

impl Endpoint
[src]

Endpoint::new accepts Region, Signature, an optional Url and an optional proxy Url:port.

Extracts out the host portion of the URL as defined by the crate Url.

Trait Implementations

impl Debug for Endpoint
[src]

Formats the value using the given formatter.

impl Clone for Endpoint
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more