Skip to content

Commit

Permalink
Add to functions in aws-config a link to documentation on default c…
Browse files Browse the repository at this point in the history
…onfigs (#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._
  • Loading branch information
ysaito1001 authored Jun 13, 2024
1 parent 3ad943a commit 98a0a5e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
# 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"
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.5.1"
version = "1.5.2"
authors = [
"AWS Rust SDK Team <[email protected]>",
"Russell Cohen <[email protected]>",
Expand Down
8 changes: 8 additions & 0 deletions aws/rust-runtime/aws-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
Expand All @@ -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() {
Expand All @@ -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
}
Expand Down

0 comments on commit 98a0a5e

Please sign in to comment.