From 98a0a5ec27d4973f7b8a86101a7c47fb71889fca Mon Sep 17 00:00:00 2001 From: ysaito1001 Date: Thu, 13 Jun 2024 11:06:29 -0500 Subject: [PATCH] Add to functions in `aws-config` a link to documentation on default configs (#3694) ## Motivation and Context aws-sdk-rust#1162 ## Testing Tests in CI ## Checklist - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --- CHANGELOG.next.toml | 8 +++++++- aws/rust-runtime/aws-config/Cargo.toml | 2 +- aws/rust-runtime/aws-config/src/lib.rs | 8 ++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index fc4c4c2578..c3bbf906e5 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -9,4 +9,10 @@ # message = "Fix typos in module documentation for generated crates" # references = ["smithy-rs#920"] # meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"} -# author = "rcoh" \ No newline at end of file +# author = "rcoh" + +[[aws-sdk-rust]] +message = "Add documentation on the default configuration to `from_env`, `load_from_env`, `defaults`, and `load_from_defaults` in the `aws-config` crate." +references = ["aws-sdk-rust#1162"] +meta = { "breaking" = false, "tada" = false, "bug" = false } +author = "ysaito1001" diff --git a/aws/rust-runtime/aws-config/Cargo.toml b/aws/rust-runtime/aws-config/Cargo.toml index 2280cd8f56..57266062ef 100644 --- a/aws/rust-runtime/aws-config/Cargo.toml +++ b/aws/rust-runtime/aws-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-config" -version = "1.5.1" +version = "1.5.2" authors = [ "AWS Rust SDK Team ", "Russell Cohen ", diff --git a/aws/rust-runtime/aws-config/src/lib.rs b/aws/rust-runtime/aws-config/src/lib.rs index cfdf6e5ad2..49bfad8d6a 100644 --- a/aws/rust-runtime/aws-config/src/lib.rs +++ b/aws/rust-runtime/aws-config/src/lib.rs @@ -145,6 +145,8 @@ pub mod web_identity_token; /// /// This loader will always set [`BehaviorVersion::latest`]. /// +/// For more information about default configuration, refer to the AWS SDKs and Tools [shared configuration documentation](https://docs.aws.amazon.com/sdkref/latest/guide/creds-config-files.html). +/// /// # Examples /// ```no_run /// # async fn create_config() { @@ -159,6 +161,8 @@ pub fn from_env() -> ConfigLoader { /// Load default configuration with the _latest_ defaults. /// /// Convenience wrapper equivalent to `aws_config::load_defaults(BehaviorVersion::latest()).await` +/// +/// For more information about default configuration, refer to the AWS SDKs and Tools [shared configuration documentation](https://docs.aws.amazon.com/sdkref/latest/guide/creds-config-files.html). #[cfg(feature = "behavior-version-latest")] pub async fn load_from_env() -> SdkConfig { from_env().load().await @@ -184,6 +188,8 @@ pub async fn load_from_env() -> SdkConfig { /// Create a config loader with the defaults for the given behavior version. /// +/// For more information about default configuration, refer to the AWS SDKs and Tools [shared configuration documentation](https://docs.aws.amazon.com/sdkref/latest/guide/creds-config-files.html). +/// /// # Examples /// ```no_run /// # async fn create_config() { @@ -201,6 +207,8 @@ pub fn defaults(version: BehaviorVersion) -> ConfigLoader { /// Load default configuration with the given behavior version. /// /// Convenience wrapper equivalent to `aws_config::defaults(behavior_version).load().await` +/// +/// For more information about default configuration, refer to the AWS SDKs and Tools [shared configuration documentation](https://docs.aws.amazon.com/sdkref/latest/guide/creds-config-files.html). pub async fn load_defaults(version: BehaviorVersion) -> SdkConfig { defaults(version).load().await }