aws-region

Crates.ioaws-region
lib.rsaws-region
version0.25.4
sourcesrc
created_at2020-03-28 14:30:29.690137
updated_at2023-10-15 20:58:19.842474
descriptionTiny Rust library for working with Amazon AWS regions, supports `s3` crate
homepage
repositoryhttps://github.com/durch/rust-s3
max_upload_size
id223827
size13,547
Drazen Urch (durch)

documentation

https://docs.rs/aws-region/latest/awsregion/

README

AWS S3 region identifier, passing in custom values is also possible, in that case it is up to you to pass a valid endpoint, otherwise boom will happen :)

Example

use std::str::FromStr;
use awsregion::Region;

// Parse from a string
let region: Region = "us-east-1".parse().unwrap();
// Choose region directly
let region = Region::EuWest2;

// Custom region requires valid region name and endpoint
let region_name = "nl-ams".to_string();
let endpoint = "https://s3.nl-ams.scw.cloud".to_string();
let region = Region::Custom { region: region_name, endpoint };
Commit count: 502

cargo fmt