Skip to content

Commit

Permalink
Make the use_dualstack provider public (#3611)
Browse files Browse the repository at this point in the history
Addresses awslabs/aws-sdk-rust#879

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: ysaito1001 <awsaito@amazon.com>
  • Loading branch information
jdisanti and ysaito1001 authored Apr 29, 2024
1 parent 2c5e37e commit d7be220
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ message = "Fix event stream `:content-type` message headers for struct messages.
references = ["smithy-rs#3603"]
meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "all" }
author = "jdisanti"

[[aws-sdk-rust]]
message = "`aws_config::default_provider::use_dual_stack_provider` is now public instead of `pub(crate)`"
references = ["aws-sdk-rust#879", "smithy-rs#3611"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "jdisanti"
2 changes: 1 addition & 1 deletion aws/rust-runtime/aws-config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aws-config"
version = "1.2.1"
version = "1.3.0"
authors = [
"AWS Rust SDK Team <aws-sdk-rust@amazon.com>",
"Russell Cohen <rcoh@amazon.com>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ mod profile_key {
pub(super) const USE_DUAL_STACK: &str = "use_dualstack_endpoint";
}

pub(crate) async fn use_dual_stack_provider(provider_config: &ProviderConfig) -> Option<bool> {
/// Load the value for "use dual-stack"
///
/// This checks the following sources:
/// 1. The environment variable `AWS_USE_DUALSTACK_ENDPOINT=true/false`
/// 2. The profile key `use_dualstack_endpoint=true/false`
///
/// If invalid values are found, the provider will return `None` and an error will be logged.
pub async fn use_dual_stack_provider(provider_config: &ProviderConfig) -> Option<bool> {
let env = provider_config.env();
let profiles = provider_config.profile().await;

Expand Down

0 comments on commit d7be220

Please sign in to comment.