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
region: Region
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: Signature
Signature is an enum of V2 or V4. Specify Signature::V2 or Signature::V4. See notes below.
endpoint: Option<Url>
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.
proxy: Option<Url>
Important: Proxies are used by most Enterprises. You can specify your proxy with the
port in the following format https://
user_agent: Option<String>
User-Agent
. It lives in Endpoint
since you may want a different User-Agent
for
Endpoint
. This value is an Option
is_bucket_virtual: bool
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]
fn new(
region: Region,
signature: Signature,
endpoint: Option<Url>,
proxy: Option<Url>,
user_agent: Option<String>,
is_bucket_virtual: Option<bool>
) -> Self
region: Region,
signature: Signature,
endpoint: Option<Url>,
proxy: Option<Url>,
user_agent: Option<String>,
is_bucket_virtual: Option<bool>
) -> Self
Endpoint::new accepts Region, Signature, an optional Url and an optional proxy Url:port.
fn hostname(&self) -> Option<String>
Extracts out the host portion of the URL as defined by the crate Url.
Trait Implementations
impl Debug for Endpoint
[src]
impl Clone for Endpoint
[src]
fn clone(&self) -> Endpoint
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more