AWS SDK

AWS SDK

rev. dff3160f3e58065fc69d1740cde7e1223681535b

Files changed:

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability/Cargo.toml

@@ -1,1 +20,20 @@
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/awslabs/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
[dependencies.aws-smithy-runtime-api]
   16     16   
path = "../aws-smithy-runtime-api"
   17         -
version = "1.8.3"
          17  +
version = "1.8.4"
   18     18   
   19     19   
[dev-dependencies]
   20     20   
serial_test = "3.1.1"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-protocol-test/Cargo.toml

@@ -1,1 +0,31 @@
   21     21   
http = "0.2.9"
   22     22   
pretty_assertions = "1.3"
   23     23   
regex-lite = "0.1.5"
   24     24   
roxmltree = "0.14.1"
   25     25   
serde_json = "1.0.128"
   26     26   
thiserror = "2"
   27     27   
   28     28   
[dependencies.aws-smithy-runtime-api]
   29     29   
path = "../aws-smithy-runtime-api"
   30     30   
features = ["client"]
   31         -
version = "1.8.3"
          31  +
version = "1.8.4"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime-api/Cargo.toml

@@ -1,1 +34,34 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-runtime-api"
    4         -
version = "1.8.3"
           4  +
version = "1.8.4"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Zelda Hessler <zhessler@amazon.com>"]
    6      6   
description = "Smithy runtime types."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime-api/src/client/auth.rs

@@ -393,393 +0,456 @@
  413    413   
    fn from(value: Option<&'a Document>) -> Self {
  414    414   
        Self(value)
  415    415   
    }
  416    416   
}
  417    417   
  418    418   
impl<'a> From<&'a Document> for AuthSchemeEndpointConfig<'a> {
  419    419   
    fn from(value: &'a Document) -> Self {
  420    420   
        Self(Some(value))
  421    421   
    }
  422    422   
}
         423  +
         424  +
/// An ordered list of [AuthSchemeId]s
         425  +
///
         426  +
/// Can be used to reorder already-resolved auth schemes by an auth scheme resolver.
         427  +
/// This list is intended as a hint rather than a strict override;
         428  +
/// any schemes not present in the resolved auth schemes will be ignored.
         429  +
#[derive(Clone, Debug, Default, Eq, PartialEq)]
         430  +
pub struct AuthSchemePreference {
         431  +
    preference_list: Vec<AuthSchemeId>,
         432  +
}
         433  +
         434  +
impl Storable for AuthSchemePreference {
         435  +
    type Storer = StoreReplace<Self>;
         436  +
}
         437  +
         438  +
impl IntoIterator for AuthSchemePreference {
         439  +
    type Item = AuthSchemeId;
         440  +
    type IntoIter = std::vec::IntoIter<Self::Item>;
         441  +
         442  +
    fn into_iter(self) -> Self::IntoIter {
         443  +
        self.preference_list.into_iter()
         444  +
    }
         445  +
}
         446  +
         447  +
impl<T> From<T> for AuthSchemePreference
         448  +
where
         449  +
    T: AsRef<[AuthSchemeId]>,
         450  +
{
         451  +
    fn from(slice: T) -> Self {
         452  +
        AuthSchemePreference {
         453  +
            preference_list: slice.as_ref().to_vec(),
         454  +
        }
         455  +
    }
         456  +
}

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime-api/src/client/auth/http.rs

@@ -1,1 +0,18 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
    6      6   
use crate::client::auth::AuthSchemeId;
    7      7   
    8      8   
/// Auth scheme ID for HTTP API key based authentication.
    9         -
pub const HTTP_API_KEY_AUTH_SCHEME_ID: AuthSchemeId = AuthSchemeId::new("http-api-key-auth");
           9  +
pub const HTTP_API_KEY_AUTH_SCHEME_ID: AuthSchemeId = AuthSchemeId::new("httpApiKeyAuth");
   10     10   
   11     11   
/// Auth scheme ID for HTTP Basic Auth.
   12         -
pub const HTTP_BASIC_AUTH_SCHEME_ID: AuthSchemeId = AuthSchemeId::new("http-basic-auth");
          12  +
pub const HTTP_BASIC_AUTH_SCHEME_ID: AuthSchemeId = AuthSchemeId::new("httpBasicAuth");
   13     13   
   14     14   
/// Auth scheme ID for HTTP Bearer Auth.
   15         -
pub const HTTP_BEARER_AUTH_SCHEME_ID: AuthSchemeId = AuthSchemeId::new("http-bearer-auth");
          15  +
pub const HTTP_BEARER_AUTH_SCHEME_ID: AuthSchemeId = AuthSchemeId::new("httpBearerAuth");
   16     16   
   17     17   
/// Auth scheme ID for HTTP Digest Auth.
   18         -
pub const HTTP_DIGEST_AUTH_SCHEME_ID: AuthSchemeId = AuthSchemeId::new("http-digest-auth");
          18  +
pub const HTTP_DIGEST_AUTH_SCHEME_ID: AuthSchemeId = AuthSchemeId::new("httpDigestAuth");

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime/Cargo.toml

@@ -1,1 +123,123 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-runtime"
    4         -
version = "1.8.4"
           4  +
version = "1.8.5"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Zelda Hessler <zhessler@amazon.com>"]
    6      6   
description = "The new smithy runtime crate"
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[package.metadata.smithy-rs-release-tooling]
   17     17   
stable = true
   18     18   
[package.metadata.cargo-udeps.ignore]
   19     19   
normal = ["aws-smithy-http"]
   20     20   
   21     21   
[features]
   22     22   
client = ["aws-smithy-runtime-api/client", "aws-smithy-types/http-body-1-x"]
   23     23   
http-auth = ["aws-smithy-runtime-api/http-auth"]
   24     24   
connector-hyper-0-14-x = ["dep:aws-smithy-http-client", "aws-smithy-http-client?/hyper-014"]
   25     25   
tls-rustls = ["dep:aws-smithy-http-client", "aws-smithy-http-client?/legacy-rustls-ring", "connector-hyper-0-14-x"]
   26     26   
default-https-client = ["dep:aws-smithy-http-client", "aws-smithy-http-client?/rustls-aws-lc"]
   27     27   
rt-tokio = ["tokio/rt"]
   28     28   
test-util = ["aws-smithy-runtime-api/test-util", "dep:tracing-subscriber", "aws-smithy-http-client/test-util", "legacy-test-util"]
   29     29   
legacy-test-util = ["aws-smithy-runtime-api/test-util", "dep:tracing-subscriber", "aws-smithy-http-client/test-util", "connector-hyper-0-14-x", "aws-smithy-http-client/legacy-test-util"]
   30     30   
wire-mock = ["legacy-test-util", "aws-smithy-http-client/wire-mock"]
   31     31   
   32     32   
[dependencies]
   33     33   
bytes = "1.10.0"
   34     34   
fastrand = "2.3.0"
   35     35   
pin-project-lite = "0.2.14"
   36     36   
pin-utils = "0.1.0"
   37     37   
tracing = "0.1.40"
   38     38   
   39     39   
[dependencies.aws-smithy-async]
   40     40   
path = "../aws-smithy-async"
   41     41   
version = "1.2.5"
   42     42   
   43     43   
[dependencies.aws-smithy-http]
   44     44   
path = "../aws-smithy-http"
   45     45   
version = "0.62.1"
   46     46   
   47     47   
[dependencies.aws-smithy-observability]
   48     48   
path = "../aws-smithy-observability"
   49     49   
version = "0.1.3"
   50     50   
   51     51   
[dependencies.aws-smithy-runtime-api]
   52     52   
path = "../aws-smithy-runtime-api"
   53         -
version = "1.8.3"
          53  +
version = "1.8.4"
   54     54   
   55     55   
[dependencies.aws-smithy-types]
   56     56   
path = "../aws-smithy-types"
   57     57   
features = ["http-body-0-4-x"]
   58     58   
version = "1.3.2"
   59     59   
   60     60   
[dependencies.aws-smithy-http-client]
   61     61   
path = "../aws-smithy-http-client"
   62     62   
optional = true
   63     63   
version = "1.0.6"
   64     64   
   65     65   
[dependencies.http-02x]
   66     66   
package = "http"
   67     67   
version = "0.2.9"
   68     68   
   69     69   
[dependencies.http-1x]
   70     70   
package = "http"
   71     71   
version = "1"
   72     72   
   73     73   
[dependencies.http-body-04x]
   74     74   
package = "http-body"
   75     75   
version = "0.4.5"
   76     76   
   77     77   
[dependencies.http-body-1x]
   78     78   
package = "http-body"
   79     79   
version = "1"
   80     80   
   81     81   
[dependencies.tokio]
   82     82   
version = "1.40.0"
   83     83   
features = []
   84     84   
   85     85   
[dependencies.tracing-subscriber]
   86     86   
version = "0.3.16"
   87     87   
optional = true
   88     88   
features = ["env-filter", "fmt", "json"]
   89     89   
   90     90   
[dev-dependencies]
   91     91   
approx = "0.5.1"
   92     92   
fastrand = "2.3.0"
   93     93   
futures-util = "0.3.29"
   94     94   
pretty_assertions = "1.4.0"
   95     95   
tracing-test = "0.2.1"
   96     96   
   97     97   
[dev-dependencies.aws-smithy-async]
   98     98   
path = "../aws-smithy-async"
   99     99   
features = ["rt-tokio", "test-util"]
  100    100   
version = "1.2.5"
  101    101   
  102    102   
[dev-dependencies.aws-smithy-runtime-api]
  103    103   
path = "../aws-smithy-runtime-api"
  104    104   
features = ["test-util"]
  105         -
version = "1.8.3"
         105  +
version = "1.8.4"
  106    106   
  107    107   
[dev-dependencies.aws-smithy-types]
  108    108   
path = "../aws-smithy-types"
  109    109   
features = ["test-util"]
  110    110   
version = "1.3.2"
  111    111   
  112    112   
[dev-dependencies.tokio]
  113    113   
version = "1.25"
  114    114   
features = ["macros", "rt", "rt-multi-thread", "test-util", "full"]
  115    115   

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime/src/client/auth/no_auth.rs

@@ -1,1 +53,53 @@
   13     13   
use aws_smithy_runtime_api::client::identity::{Identity, SharedIdentityResolver};
   14     14   
use aws_smithy_runtime_api::client::orchestrator::HttpRequest;
   15     15   
use aws_smithy_runtime_api::client::runtime_components::{
   16     16   
    GetIdentityResolver, RuntimeComponents, RuntimeComponentsBuilder,
   17     17   
};
   18     18   
use aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
   19     19   
use aws_smithy_types::config_bag::ConfigBag;
   20     20   
use std::borrow::Cow;
   21     21   
   22     22   
/// Auth scheme ID for "no auth".
   23         -
pub const NO_AUTH_SCHEME_ID: AuthSchemeId = AuthSchemeId::new("no_auth");
          23  +
pub const NO_AUTH_SCHEME_ID: AuthSchemeId = AuthSchemeId::new("noAuth");
   24     24   
   25     25   
/// A [`RuntimePlugin`] that registers a "no auth" identity resolver and auth scheme.
   26     26   
///
   27     27   
/// This plugin can be used to disable authentication in certain cases, such as when there is
   28     28   
/// a Smithy `@optionalAuth` trait.
   29     29   
#[non_exhaustive]
   30     30   
#[derive(Debug)]
   31     31   
pub struct NoAuthRuntimePlugin(RuntimeComponentsBuilder);
   32     32   
   33     33   
impl Default for NoAuthRuntimePlugin {

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime/src/client/orchestrator/auth.rs

@@ -1,1 +51,52 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
    6      6   
use crate::client::auth::no_auth::NO_AUTH_SCHEME_ID;
    7      7   
use crate::client::identity::IdentityCache;
    8      8   
use aws_smithy_runtime_api::box_error::BoxError;
    9      9   
use aws_smithy_runtime_api::client::auth::{
   10         -
    AuthScheme, AuthSchemeEndpointConfig, AuthSchemeId, AuthSchemeOptionResolverParams,
   11         -
    ResolveAuthSchemeOptions,
          10  +
    AuthScheme, AuthSchemeEndpointConfig, AuthSchemeId, AuthSchemeOption,
          11  +
    AuthSchemeOptionResolverParams, AuthSchemePreference, ResolveAuthSchemeOptions,
   12     12   
};
   13     13   
use aws_smithy_runtime_api::client::endpoint::{EndpointResolverParams, ResolveEndpoint};
   14     14   
use aws_smithy_runtime_api::client::identity::{Identity, ResolveIdentity};
   15     15   
use aws_smithy_runtime_api::client::identity::{IdentityCacheLocation, ResolveCachedIdentity};
   16     16   
use aws_smithy_runtime_api::client::interceptors::context::InterceptorContext;
   17     17   
use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
   18     18   
use aws_smithy_types::config_bag::{ConfigBag, Storable, StoreReplace};
   19     19   
use aws_smithy_types::endpoint::Endpoint;
   20     20   
use aws_smithy_types::Document;
   21     21   
use std::borrow::Cow;
          22  +
use std::collections::HashMap;
   22     23   
use std::error::Error as StdError;
   23     24   
use std::fmt;
   24     25   
use tracing::trace;
   25     26   
   26     27   
#[derive(Debug)]
   27     28   
struct NoMatchingAuthSchemeError(ExploredList);
   28     29   
   29     30   
impl fmt::Display for NoMatchingAuthSchemeError {
   30     31   
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
   31     32   
        let explored = &self.0;
@@ -98,99 +217,254 @@
  118    119   
    runtime_components: &RuntimeComponents,
  119    120   
    cfg: &mut ConfigBag,
  120    121   
) -> Result<(AuthSchemeId, Identity, Option<Endpoint>), BoxError> {
  121    122   
    let params = cfg
  122    123   
        .load::<AuthSchemeOptionResolverParams>()
  123    124   
        .expect("auth scheme option resolver params must be set");
  124    125   
    let option_resolver = runtime_components.auth_scheme_option_resolver();
  125    126   
    let options = option_resolver
  126    127   
        .resolve_auth_scheme_options_v2(params, cfg, runtime_components)
  127    128   
        .await?;
         129  +
    let options =
         130  +
        reprioritize_with_auth_scheme_preference(options, cfg.load::<AuthSchemePreference>()).await;
  128    131   
  129    132   
    trace!(
  130    133   
        auth_scheme_option_resolver_params = ?params,
  131    134   
        auth_scheme_options = ?options,
  132    135   
        "orchestrating auth",
  133    136   
    );
  134    137   
  135    138   
    let mut explored = ExploredList::default();
  136    139   
  137    140   
    // Iterate over IDs of possibly-supported auth schemes
  138    141   
    for auth_scheme_option in &options {
  139    142   
        let scheme_id = auth_scheme_option.scheme_id();
  140    143   
        // For each ID, try to resolve the corresponding auth scheme.
  141    144   
        if let Some(auth_scheme) = runtime_components.auth_scheme(scheme_id) {
  142    145   
            // Use the resolved auth scheme to resolve an identity
  143    146   
            if let Some(identity_resolver) = auth_scheme.identity_resolver(runtime_components) {
  144    147   
                match legacy_try_resolve_endpoint(runtime_components, cfg, scheme_id).await {
  145    148   
                    Ok(endpoint) => {
  146    149   
                        trace!(scheme_id= ?scheme_id, "resolving identity");
  147    150   
                        let identity_cache = if identity_resolver.cache_location()
  148    151   
                            == IdentityCacheLocation::RuntimeComponents
  149    152   
                        {
  150    153   
                            runtime_components.identity_cache()
  151    154   
                        } else {
  152    155   
                            IdentityCache::no_cache()
  153    156   
                        };
  154    157   
                        // Apply properties from the selected auth scheme option
  155    158   
                        if let Some(properties) = auth_scheme_option.properties() {
  156    159   
                            cfg.push_shared_layer(properties);
  157    160   
                        }
  158    161   
                        let identity = identity_cache
  159    162   
                            .resolve_cached_identity(identity_resolver, runtime_components, cfg)
  160    163   
                            .await?;
  161    164   
                        trace!(identity = ?identity, "resolved identity");
  162    165   
                        return Ok((scheme_id.clone(), identity, endpoint));
  163    166   
                    }
  164    167   
                    Err(AuthOrchestrationError::MissingEndpointConfig) => {
  165    168   
                        explored.push(scheme_id.clone(), ExploreResult::MissingEndpointConfig);
  166    169   
                        continue;
  167    170   
                    }
  168    171   
                    Err(AuthOrchestrationError::FailedToResolveEndpoint(source)) => {
  169    172   
                        // Some negative endpoint tests expect an endpoint resolution error,
  170    173   
                        // so we need to return it to satisfy them.
  171    174   
                        return Err(source);
  172    175   
                    }
  173    176   
                    Err(other_err) => {
  174    177   
                        return Err(other_err.into());
  175    178   
                    }
  176    179   
                }
  177    180   
            } else {
  178    181   
                explored.push(scheme_id.clone(), ExploreResult::NoIdentityResolver);
  179    182   
            }
  180    183   
        } else {
  181    184   
            explored.push(scheme_id.clone(), ExploreResult::NoAuthScheme);
  182    185   
        }
  183    186   
    }
  184    187   
  185    188   
    Err(NoMatchingAuthSchemeError(explored).into())
  186    189   
}
  187    190   
         191  +
// Re-prioritize `supported_auth_scheme_options` based on `auth_scheme_preference`
         192  +
//
         193  +
// Schemes in `auth_scheme_preference` that are not present in `supported_auth_scheme_options` will be ignored.
         194  +
async fn reprioritize_with_auth_scheme_preference(
         195  +
    supported_auth_scheme_options: Vec<AuthSchemeOption>,
         196  +
    auth_scheme_preference: Option<&AuthSchemePreference>,
         197  +
) -> Vec<AuthSchemeOption> {
         198  +
    match auth_scheme_preference {
         199  +
        Some(preference) => {
         200  +
            // maps auth scheme ID to the index in the preference list
         201  +
            let preference_map: HashMap<_, _> = preference
         202  +
                .clone()
         203  +
                .into_iter()
         204  +
                .enumerate()
         205  +
                .map(|(i, s)| (s, i))
         206  +
                .collect();
         207  +
            let (mut preferred, non_preferred): (Vec<_>, Vec<_>) = supported_auth_scheme_options
         208  +
                .into_iter()
         209  +
                .partition(|auth_scheme_option| {
         210  +
                    preference_map.contains_key(auth_scheme_option.scheme_id())
         211  +
                });
         212  +
         213  +
            preferred.sort_by_key(|opt| {
         214  +
                preference_map
         215  +
                    .get(opt.scheme_id())
         216  +
                    .expect("guaranteed by `partition`")
         217  +
            });
         218  +
            preferred.extend(non_preferred);
         219  +
            preferred
         220  +
        }
         221  +
        None => supported_auth_scheme_options,
         222  +
    }
         223  +
}
         224  +
  188    225   
pub(super) fn sign_request(
  189    226   
    scheme_id: &AuthSchemeId,
  190    227   
    identity: &Identity,
  191    228   
    ctx: &mut InterceptorContext,
  192    229   
    runtime_components: &RuntimeComponents,
  193    230   
    cfg: &ConfigBag,
  194    231   
) -> Result<(), BoxError> {
  195    232   
    trace!("signing request");
  196    233   
    let request = ctx.request_mut().expect("set during serialization");
  197    234   
    let endpoint = cfg
@@ -858,895 +888,1135 @@
  878    915   
                ExploreResult::MissingEndpointConfig,
  879    916   
            );
  880    917   
        }
  881    918   
        let err = NoMatchingAuthSchemeError(list).to_string();
  882    919   
        if !err.contains(
  883    920   
            "Note: there were other auth schemes that were evaluated that weren't listed here",
  884    921   
        ) {
  885    922   
            panic!("The error should indicate that the explored list was truncated.");
  886    923   
        }
  887    924   
    }
         925  +
         926  +
    #[cfg(feature = "http-auth")]
         927  +
    #[tokio::test]
         928  +
    async fn test_resolve_identity() {
         929  +
        use crate::client::auth::http::{ApiKeyAuthScheme, ApiKeyLocation, BasicAuthScheme};
         930  +
        use aws_smithy_runtime_api::client::auth::http::{
         931  +
            HTTP_API_KEY_AUTH_SCHEME_ID, HTTP_BASIC_AUTH_SCHEME_ID,
         932  +
        };
         933  +
        use aws_smithy_runtime_api::client::identity::http::Token;
         934  +
        use aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder;
         935  +
         936  +
        #[derive(Debug)]
         937  +
        struct Cache;
         938  +
        impl ResolveCachedIdentity for Cache {
         939  +
            fn resolve_cached_identity<'a>(
         940  +
                &'a self,
         941  +
                identity_resolver: SharedIdentityResolver,
         942  +
                rc: &'a RuntimeComponents,
         943  +
                cfg: &'a ConfigBag,
         944  +
            ) -> IdentityFuture<'a> {
         945  +
                IdentityFuture::new(
         946  +
                    async move { identity_resolver.resolve_identity(rc, cfg).await },
         947  +
                )
         948  +
            }
         949  +
        }
         950  +
         951  +
        let mut layer = Layer::new("test");
         952  +
        layer.store_put(AuthSchemeAndEndpointOrchestrationV2);
         953  +
        layer.store_put(AuthSchemeOptionResolverParams::new("doesntmatter"));
         954  +
        let mut cfg = ConfigBag::of_layers(vec![layer]);
         955  +
         956  +
        let runtime_components_builder = RuntimeComponentsBuilder::for_tests()
         957  +
            .with_auth_scheme(SharedAuthScheme::new(BasicAuthScheme::new()))
         958  +
            .with_auth_scheme(SharedAuthScheme::new(ApiKeyAuthScheme::new(
         959  +
                "result:",
         960  +
                ApiKeyLocation::Header,
         961  +
                "Authorization",
         962  +
            )))
         963  +
            .with_auth_scheme_option_resolver(Some(SharedAuthSchemeOptionResolver::new(
         964  +
                StaticAuthSchemeOptionResolver::new(vec![
         965  +
                    HTTP_BASIC_AUTH_SCHEME_ID,
         966  +
                    HTTP_API_KEY_AUTH_SCHEME_ID,
         967  +
                ]),
         968  +
            )))
         969  +
            .with_identity_cache(Some(Cache));
         970  +
         971  +
        struct TestCase {
         972  +
            builder_updater: Box<dyn Fn(RuntimeComponentsBuilder) -> RuntimeComponents>,
         973  +
            resolved_auth_scheme: AuthSchemeId,
         974  +
            should_error: bool,
         975  +
        }
         976  +
         977  +
        for test_case in [
         978  +
            TestCase {
         979  +
                builder_updater: Box::new(|rcb: RuntimeComponentsBuilder| {
         980  +
                    rcb.with_identity_resolver(
         981  +
                        HTTP_BASIC_AUTH_SCHEME_ID,
         982  +
                        SharedIdentityResolver::new(Token::new("basic", None)),
         983  +
                    )
         984  +
                    .with_identity_resolver(
         985  +
                        HTTP_API_KEY_AUTH_SCHEME_ID,
         986  +
                        SharedIdentityResolver::new(Token::new("api-key", None)),
         987  +
                    )
         988  +
                    .build()
         989  +
                    .unwrap()
         990  +
                }),
         991  +
                resolved_auth_scheme: HTTP_BASIC_AUTH_SCHEME_ID,
         992  +
                should_error: false,
         993  +
            },
         994  +
            TestCase {
         995  +
                builder_updater: Box::new(|rcb: RuntimeComponentsBuilder| {
         996  +
                    rcb.with_identity_resolver(
         997  +
                        HTTP_BASIC_AUTH_SCHEME_ID,
         998  +
                        SharedIdentityResolver::new(Token::new("basic", None)),
         999  +
                    )
        1000  +
                    .build()
        1001  +
                    .unwrap()
        1002  +
                }),
        1003  +
                resolved_auth_scheme: HTTP_BASIC_AUTH_SCHEME_ID,
        1004  +
                should_error: false,
        1005  +
            },
        1006  +
            TestCase {
        1007  +
                builder_updater: Box::new(|rcb: RuntimeComponentsBuilder| {
        1008  +
                    rcb.with_identity_resolver(
        1009  +
                        HTTP_API_KEY_AUTH_SCHEME_ID,
        1010  +
                        SharedIdentityResolver::new(Token::new("api-key", None)),
        1011  +
                    )
        1012  +
                    .build()
        1013  +
                    .unwrap()
        1014  +
                }),
        1015  +
                resolved_auth_scheme: HTTP_API_KEY_AUTH_SCHEME_ID,
        1016  +
                should_error: false,
        1017  +
            },
        1018  +
            TestCase {
        1019  +
                builder_updater: Box::new(|rcb: RuntimeComponentsBuilder| rcb.build().unwrap()),
        1020  +
                resolved_auth_scheme: HTTP_API_KEY_AUTH_SCHEME_ID,
        1021  +
                should_error: true,
        1022  +
            },
        1023  +
        ]
        1024  +
        .into_iter()
        1025  +
        {
        1026  +
            let runtime_components =
        1027  +
                (test_case.builder_updater)(runtime_components_builder.clone());
        1028  +
            match resolve_identity(&runtime_components, &mut cfg).await {
        1029  +
                Ok(resolved) => assert_eq!(test_case.resolved_auth_scheme, resolved.0),
        1030  +
                Err(e) if test_case.should_error => {
        1031  +
                    assert!(e.downcast_ref::<NoMatchingAuthSchemeError>().is_some());
        1032  +
                }
        1033  +
                _ => {
        1034  +
                    panic!("`resolve_identity` returned an `Err` when no error was expected in the test.");
        1035  +
                }
        1036  +
            }
        1037  +
        }
        1038  +
    }
        1039  +
        1040  +
    #[cfg(feature = "http-auth")]
        1041  +
    #[tokio::test]
        1042  +
    async fn auth_scheme_preference() {
        1043  +
        use aws_smithy_runtime_api::client::auth::http::{
        1044  +
            HTTP_API_KEY_AUTH_SCHEME_ID, HTTP_BASIC_AUTH_SCHEME_ID, HTTP_BEARER_AUTH_SCHEME_ID,
        1045  +
        };
        1046  +
        1047  +
        struct TestCase {
        1048  +
            supported: Vec<AuthSchemeOption>,
        1049  +
            preference: Option<AuthSchemePreference>,
        1050  +
            expected_resolved_auths: Vec<AuthSchemeId>,
        1051  +
        }
        1052  +
        1053  +
        for test_case in [
        1054  +
            TestCase {
        1055  +
                supported: [HTTP_API_KEY_AUTH_SCHEME_ID, HTTP_BASIC_AUTH_SCHEME_ID]
        1056  +
                    .map(AuthSchemeOption::from)
        1057  +
                    .to_vec(),
        1058  +
                preference: None,
        1059  +
                expected_resolved_auths: vec![
        1060  +
                    HTTP_API_KEY_AUTH_SCHEME_ID,
        1061  +
                    HTTP_BASIC_AUTH_SCHEME_ID,
        1062  +
                ],
        1063  +
            },
        1064  +
            TestCase {
        1065  +
                supported: [HTTP_API_KEY_AUTH_SCHEME_ID, HTTP_BASIC_AUTH_SCHEME_ID]
        1066  +
                    .map(AuthSchemeOption::from)
        1067  +
                    .to_vec(),
        1068  +
                preference: Some([].into()),
        1069  +
                expected_resolved_auths: vec![
        1070  +
                    HTTP_API_KEY_AUTH_SCHEME_ID,
        1071  +
                    HTTP_BASIC_AUTH_SCHEME_ID,
        1072  +
                ],
        1073  +
            },
        1074  +
            TestCase {
        1075  +
                supported: [HTTP_API_KEY_AUTH_SCHEME_ID, HTTP_BASIC_AUTH_SCHEME_ID]
        1076  +
                    .map(AuthSchemeOption::from)
        1077  +
                    .to_vec(),
        1078  +
                preference: Some(["bogus"].map(AuthSchemeId::from).into()),
        1079  +
                expected_resolved_auths: vec![
        1080  +
                    HTTP_API_KEY_AUTH_SCHEME_ID,
        1081  +
                    HTTP_BASIC_AUTH_SCHEME_ID,
        1082  +
                ],
        1083  +
            },
        1084  +
            TestCase {
        1085  +
                supported: [HTTP_API_KEY_AUTH_SCHEME_ID, HTTP_BASIC_AUTH_SCHEME_ID]
        1086  +
                    .map(AuthSchemeOption::from)
        1087  +
                    .to_vec(),
        1088  +
                preference: Some([HTTP_BASIC_AUTH_SCHEME_ID].into()),
        1089  +
                expected_resolved_auths: vec![
        1090  +
                    HTTP_BASIC_AUTH_SCHEME_ID,
        1091  +
                    HTTP_API_KEY_AUTH_SCHEME_ID,
        1092  +
                ],
        1093  +
            },
        1094  +
            TestCase {
        1095  +
                supported: [HTTP_API_KEY_AUTH_SCHEME_ID, HTTP_BASIC_AUTH_SCHEME_ID]
        1096  +
                    .map(AuthSchemeOption::from)
        1097  +
                    .to_vec(),
        1098  +
                preference: Some([HTTP_BASIC_AUTH_SCHEME_ID, HTTP_API_KEY_AUTH_SCHEME_ID].into()),
        1099  +
                expected_resolved_auths: vec![
        1100  +
                    HTTP_BASIC_AUTH_SCHEME_ID,
        1101  +
                    HTTP_API_KEY_AUTH_SCHEME_ID,
        1102  +
                ],
        1103  +
            },
        1104  +
            TestCase {
        1105  +
                supported: [HTTP_API_KEY_AUTH_SCHEME_ID, HTTP_BASIC_AUTH_SCHEME_ID]
        1106  +
                    .map(AuthSchemeOption::from)
        1107  +
                    .to_vec(),
        1108  +
                preference: Some(
        1109  +
                    [
        1110  +
                        HTTP_BASIC_AUTH_SCHEME_ID,
        1111  +
                        HTTP_BEARER_AUTH_SCHEME_ID,
        1112  +
                        HTTP_API_KEY_AUTH_SCHEME_ID,
        1113  +
                    ]
        1114  +
                    .into(),
        1115  +
                ),
        1116  +
                expected_resolved_auths: vec![
        1117  +
                    HTTP_BASIC_AUTH_SCHEME_ID,
        1118  +
                    HTTP_API_KEY_AUTH_SCHEME_ID,
        1119  +
                ],
        1120  +
            },
        1121  +
        ] {
        1122  +
            let actual = reprioritize_with_auth_scheme_preference(
        1123  +
                test_case.supported,
        1124  +
                test_case.preference.as_ref(),
        1125  +
            )
        1126  +
            .await;
        1127  +
            let actual = actual
        1128  +
                .iter()
        1129  +
                .map(|opt| opt.scheme_id())
        1130  +
                .cloned()
        1131  +
                .collect::<Vec<_>>();
        1132  +
            assert_eq!(test_case.expected_resolved_auths, actual);
        1133  +
        }
        1134  +
    }
  888   1135   
}

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-wasm/Cargo.toml

@@ -1,1 +33,33 @@
   15     15   
   16     16   
[dependencies]
   17     17   
bytes = "1.10.0"
   18     18   
http = "1.0.0"
   19     19   
tracing = "0.1.40"
   20     20   
wasi = "0.12.1"
   21     21   
   22     22   
[dependencies.aws-smithy-runtime-api]
   23     23   
path = "../aws-smithy-runtime-api"
   24     24   
features = ["http-1x"]
   25         -
version = "1.8.3"
          25  +
version = "1.8.4"
   26     26   
   27     27   
[dependencies.aws-smithy-http]
   28     28   
path = "../aws-smithy-http"
   29     29   
version = "0.62.1"
   30     30   
   31     31   
[dependencies.aws-smithy-types]
   32     32   
path = "../aws-smithy-types"
   33     33   
version = "1.3.2"

tmp-codegen-diff/aws-sdk/sdk/aws-types/Cargo.toml

@@ -1,1 +69,69 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-types"
    4         -
version = "1.3.7"
           4  +
version = "1.3.8"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
    6      6   
description = "Cross-service types for the AWS SDK."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[package.metadata.smithy-rs-release-tooling]
   17     17   
stable = true
   18     18   
[package.metadata.cargo-udeps.ignore]
   19     19   
normal = ["aws-smithy-runtime", "hyper-rustls"]
   20     20   
   21     21   
[features]
   22     22   
examples = ["dep:hyper-rustls", "aws-smithy-runtime/client", "aws-smithy-runtime/connector-hyper-0-14-x", "aws-smithy-runtime/tls-rustls"]
   23     23   
   24     24   
[dependencies]
   25     25   
tracing = "0.1.40"
   26     26   
   27     27   
[dependencies.aws-credential-types]
   28     28   
path = "../aws-credential-types"
   29     29   
version = "1.2.4"
   30     30   
   31     31   
[dependencies.aws-smithy-async]
   32     32   
path = "../aws-smithy-async"
   33     33   
version = "1.2.5"
   34     34   
   35     35   
[dependencies.aws-smithy-types]
   36     36   
path = "../aws-smithy-types"
   37     37   
version = "1.3.2"
   38     38   
   39     39   
[dependencies.aws-smithy-runtime]
   40     40   
path = "../aws-smithy-runtime"
   41     41   
optional = true
   42         -
version = "1.8.4"
          42  +
version = "1.8.5"
   43     43   
   44     44   
[dependencies.aws-smithy-runtime-api]
   45     45   
path = "../aws-smithy-runtime-api"
   46     46   
features = ["client"]
   47         -
version = "1.8.3"
          47  +
version = "1.8.4"
   48     48   
   49     49   
[dependencies.hyper-rustls]
   50     50   
version = "0.24"
   51     51   
optional = true
   52     52   
features = ["rustls-native-certs", "http2", "webpki-roots"]
   53     53   
   54     54   
[dev-dependencies]
   55     55   
http = "0.2.4"
   56     56   
tempfile = "3.16.0"
   57     57   
tracing-test = "0.2.5"
   58     58   
   59     59   
[dev-dependencies.tokio]
   60     60   
version = "1"
   61     61   
features = ["rt", "macros"]
   62     62   
   63     63   
[dev-dependencies.aws-smithy-runtime-api]
   64     64   
path = "../aws-smithy-runtime-api"
   65     65   
features = ["http-02x"]
   66         -
version = "1.8.3"
          66  +
version = "1.8.4"
   67     67   
   68     68   
[build-dependencies]
   69     69   
rustc_version = "0.4.0"

tmp-codegen-diff/aws-sdk/sdk/aws-types/external-types.toml

@@ -1,1 +24,23 @@
    1      1   
allowed_external_types = [
    2         -
    "aws_credential_types::cache::CredentialsCache",
    3      2   
    "aws_credential_types::provider::credentials::SharedCredentialsProvider",
    4      3   
    "aws_credential_types::provider::token::SharedTokenProvider",
    5      4   
    "aws_smithy_async::rt::sleep::AsyncSleep",
    6      5   
    "aws_smithy_async::rt::sleep::SharedAsyncSleep",
    7      6   
    "aws_smithy_async::time::SharedTimeSource",
    8      7   
    "aws_smithy_async::time::TimeSource",
           8  +
    "aws_smithy_runtime_api::client::auth::AuthSchemePreference",
    9      9   
    "aws_smithy_runtime_api::client::behavior_version::BehaviorVersion",
   10     10   
    "aws_smithy_runtime_api::client::http::HttpClient",
   11     11   
    "aws_smithy_runtime_api::client::http::SharedHttpClient",
   12     12   
    "aws_smithy_runtime_api::client::identity::ResolveCachedIdentity",
   13     13   
    "aws_smithy_runtime_api::client::identity::SharedIdentityCache",
   14     14   
    "aws_smithy_runtime_api::client::stalled_stream_protection::StalledStreamProtectionConfig",
   15     15   
    "aws_smithy_runtime_api::http::headers::Headers",
   16     16   
    "aws_smithy_types::checksum_config::ResponseChecksumValidation",
   17     17   
    "aws_smithy_types::checksum_config::RequestChecksumCalculation",
   18     18   
    "aws_smithy_types::config_bag::storable::Storable",
   19     19   
    "aws_smithy_types::config_bag::storable::StoreReplace",
   20         -
    "aws_smithy_types::config_bag::storable::Storer",
   21     20   
    "aws_smithy_types::error::metadata::Builder",
   22     21   
    "aws_smithy_types::retry::RetryConfig",
   23     22   
    "aws_smithy_types::timeout::TimeoutConfig",
   24     23   
]

tmp-codegen-diff/aws-sdk/sdk/aws-types/src/sdk_config.rs

@@ -1,1 +52,53 @@
   13     13   
use crate::docs_for;
   14     14   
use crate::endpoint_config::AccountIdEndpointMode;
   15     15   
use crate::origin::Origin;
   16     16   
use crate::region::Region;
   17     17   
use crate::service_config::LoadServiceConfig;
   18     18   
use aws_credential_types::provider::token::SharedTokenProvider;
   19     19   
pub use aws_credential_types::provider::SharedCredentialsProvider;
   20     20   
use aws_smithy_async::rt::sleep::AsyncSleep;
   21     21   
pub use aws_smithy_async::rt::sleep::SharedAsyncSleep;
   22     22   
pub use aws_smithy_async::time::{SharedTimeSource, TimeSource};
          23  +
use aws_smithy_runtime_api::client::auth::AuthSchemePreference;
   23     24   
use aws_smithy_runtime_api::client::behavior_version::BehaviorVersion;
   24     25   
use aws_smithy_runtime_api::client::http::HttpClient;
   25     26   
pub use aws_smithy_runtime_api::client::http::SharedHttpClient;
   26     27   
use aws_smithy_runtime_api::client::identity::{ResolveCachedIdentity, SharedIdentityCache};
   27     28   
pub use aws_smithy_runtime_api::client::stalled_stream_protection::StalledStreamProtectionConfig;
   28     29   
use aws_smithy_runtime_api::shared::IntoShared;
   29     30   
pub use aws_smithy_types::checksum_config::{
   30     31   
    RequestChecksumCalculation, ResponseChecksumValidation,
   31     32   
};
   32     33   
pub use aws_smithy_types::retry::RetryConfig;
@@ -54,55 +152,166 @@
   74     75   
        (account_id_endpoint_mode) => {
   75     76   
"Controls the account ID-based routing behavior.
   76     77   
   77     78   
By default, the routing behavior is set to `preferred`.
   78     79   
Customers can adjust this setting to other values to switch between different routing patterns or temporarily disable the feature.
   79     80   
   80     81   
See the developer guide on [account-based endpoints](https://docs.aws.amazon.com/sdkref/latest/guide/feature-account-endpoints.html)
   81     82   
for more information.
   82     83   
   83     84   
For services that do not use the account-based endpoints, this setting does nothing.
          85  +
" };
          86  +
        (auth_scheme_preference) => {
          87  +
"Set the auth scheme preference for an auth scheme resolver
          88  +
(typically the default auth scheme resolver).
          89  +
          90  +
Each operation has a predefined order of auth schemes, as determined by the service,
          91  +
for auth scheme resolution. By using the auth scheme preference, customers
          92  +
can reorder the schemes resolved by the auth scheme resolver.
          93  +
          94  +
The preference list is intended as a hint rather than a strict override.
          95  +
Any schemes not present in the originally resolved auth schemes will be ignored.
   84     96   
" };
   85     97   
    }
   86     98   
}
   87     99   
   88    100   
/// AWS Shared Configuration
   89    101   
#[derive(Debug, Clone)]
   90    102   
pub struct SdkConfig {
   91    103   
    app_name: Option<AppName>,
         104  +
    auth_scheme_preference: Option<AuthSchemePreference>,
   92    105   
    identity_cache: Option<SharedIdentityCache>,
   93    106   
    credentials_provider: Option<SharedCredentialsProvider>,
   94    107   
    token_provider: Option<SharedTokenProvider>,
   95    108   
    region: Option<Region>,
   96    109   
    account_id_endpoint_mode: Option<AccountIdEndpointMode>,
   97    110   
    endpoint_url: Option<String>,
   98    111   
    retry_config: Option<RetryConfig>,
   99    112   
    sleep_impl: Option<SharedAsyncSleep>,
  100    113   
    time_source: Option<SharedTimeSource>,
  101    114   
    timeout_config: Option<TimeoutConfig>,
  102    115   
    stalled_stream_protection_config: Option<StalledStreamProtectionConfig>,
  103    116   
    http_client: Option<SharedHttpClient>,
  104    117   
    use_fips: Option<bool>,
  105    118   
    use_dual_stack: Option<bool>,
  106    119   
    behavior_version: Option<BehaviorVersion>,
  107    120   
    service_config: Option<Arc<dyn LoadServiceConfig>>,
  108    121   
    config_origins: HashMap<&'static str, Origin>,
  109    122   
    disable_request_compression: Option<bool>,
  110    123   
    request_min_compression_size_bytes: Option<u32>,
  111    124   
    request_checksum_calculation: Option<RequestChecksumCalculation>,
  112    125   
    response_checksum_validation: Option<ResponseChecksumValidation>,
  113    126   
}
  114    127   
  115    128   
/// Builder for AWS Shared Configuration
  116    129   
///
  117    130   
/// _Important:_ Using the `aws-config` crate to configure the SDK is preferred to invoking this
  118    131   
/// builder directly. Using this builder directly won't pull in any AWS recommended default
  119    132   
/// configuration values.
  120    133   
#[derive(Debug, Default)]
  121    134   
pub struct Builder {
  122    135   
    app_name: Option<AppName>,
         136  +
    auth_scheme_preference: Option<AuthSchemePreference>,
  123    137   
    identity_cache: Option<SharedIdentityCache>,
  124    138   
    credentials_provider: Option<SharedCredentialsProvider>,
  125    139   
    token_provider: Option<SharedTokenProvider>,
  126    140   
    region: Option<Region>,
  127    141   
    account_id_endpoint_mode: Option<AccountIdEndpointMode>,
  128    142   
    endpoint_url: Option<String>,
  129    143   
    retry_config: Option<RetryConfig>,
  130    144   
    sleep_impl: Option<SharedAsyncSleep>,
  131    145   
    time_source: Option<SharedTimeSource>,
  132    146   
    timeout_config: Option<TimeoutConfig>,
@@ -750,764 +821,854 @@
  770    784   
    /// `SdkConfig` and provides access to config defined in the environment
  771    785   
    /// which would otherwise be inaccessible.
  772    786   
    pub fn set_service_config(
  773    787   
        &mut self,
  774    788   
        service_config: Option<impl LoadServiceConfig + 'static>,
  775    789   
    ) -> &mut Self {
  776    790   
        self.service_config = service_config.map(|it| Arc::new(it) as Arc<dyn LoadServiceConfig>);
  777    791   
        self
  778    792   
    }
  779    793   
         794  +
    #[doc = docs_for!(auth_scheme_preference)]
         795  +
    pub fn auth_scheme_preference(
         796  +
        mut self,
         797  +
        auth_scheme_preference: impl Into<AuthSchemePreference>,
         798  +
    ) -> Self {
         799  +
        self.set_auth_scheme_preference(Some(auth_scheme_preference));
         800  +
        self
         801  +
    }
         802  +
         803  +
    #[doc = docs_for!(auth_scheme_preference)]
         804  +
    pub fn set_auth_scheme_preference(
         805  +
        &mut self,
         806  +
        auth_scheme_preference: Option<impl Into<AuthSchemePreference>>,
         807  +
    ) -> &mut Self {
         808  +
        self.auth_scheme_preference = auth_scheme_preference.map(|pref| pref.into());
         809  +
        self
         810  +
    }
         811  +
  780    812   
    /// Set the origin of a setting.
  781    813   
    ///
  782    814   
    /// This is used internally to understand how to merge config structs while
  783    815   
    /// respecting precedence of origins.
  784    816   
    pub fn insert_origin(&mut self, setting: &'static str, origin: Origin) {
  785    817   
        self.config_origins.insert(setting, origin);
  786    818   
    }
  787    819   
  788    820   
    /// Build a [`SdkConfig`] from this builder.
  789    821   
    pub fn build(self) -> SdkConfig {
  790    822   
        SdkConfig {
  791    823   
            app_name: self.app_name,
         824  +
            auth_scheme_preference: self.auth_scheme_preference,
  792    825   
            identity_cache: self.identity_cache,
  793    826   
            credentials_provider: self.credentials_provider,
  794    827   
            token_provider: self.token_provider,
  795    828   
            region: self.region,
  796    829   
            account_id_endpoint_mode: self.account_id_endpoint_mode,
  797    830   
            endpoint_url: self.endpoint_url,
  798    831   
            retry_config: self.retry_config,
  799    832   
            sleep_impl: self.sleep_impl,
  800    833   
            timeout_config: self.timeout_config,
  801    834   
            http_client: self.http_client,
@@ -869,902 +928,966 @@
  889    922   
    /// Configured region
  890    923   
    pub fn region(&self) -> Option<&Region> {
  891    924   
        self.region.as_ref()
  892    925   
    }
  893    926   
  894    927   
    /// Configured account ID endpoint mode
  895    928   
    pub fn account_id_endpoint_mode(&self) -> Option<&AccountIdEndpointMode> {
  896    929   
        self.account_id_endpoint_mode.as_ref()
  897    930   
    }
  898    931   
         932  +
    /// Configured auth scheme preference
         933  +
    pub fn auth_scheme_preference(&self) -> Option<&AuthSchemePreference> {
         934  +
        self.auth_scheme_preference.as_ref()
         935  +
    }
         936  +
  899    937   
    /// Configured endpoint URL
  900    938   
    pub fn endpoint_url(&self) -> Option<&str> {
  901    939   
        self.endpoint_url.as_deref()
  902    940   
    }
  903    941   
  904    942   
    /// Configured retry config
  905    943   
    pub fn retry_config(&self) -> Option<&RetryConfig> {
  906    944   
        self.retry_config.as_ref()
  907    945   
    }
  908    946   
@@ -993,1031 +1046,1085 @@
 1013   1051   
        self.config_origins
 1014   1052   
            .get(setting)
 1015   1053   
            .cloned()
 1016   1054   
            .unwrap_or_default()
 1017   1055   
    }
 1018   1056   
 1019   1057   
    /// Convert this [`SdkConfig`] back to a builder to enable modification
 1020   1058   
    pub fn into_builder(self) -> Builder {
 1021   1059   
        Builder {
 1022   1060   
            app_name: self.app_name,
        1061  +
            auth_scheme_preference: self.auth_scheme_preference,
 1023   1062   
            identity_cache: self.identity_cache,
 1024   1063   
            credentials_provider: self.credentials_provider,
 1025   1064   
            token_provider: self.token_provider,
 1026   1065   
            region: self.region,
 1027   1066   
            account_id_endpoint_mode: self.account_id_endpoint_mode,
 1028   1067   
            endpoint_url: self.endpoint_url,
 1029   1068   
            retry_config: self.retry_config,
 1030   1069   
            sleep_impl: self.sleep_impl,
 1031   1070   
            time_source: self.time_source,
 1032   1071   
            timeout_config: self.timeout_config,

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/Cargo.toml

@@ -16,16 +95,95 @@
   36     36   
features = ["event-stream"]
   37     37   
version = "0.62.1"
   38     38   
   39     39   
[dependencies.aws-smithy-json]
   40     40   
path = "../aws-smithy-json"
   41     41   
version = "0.61.4"
   42     42   
   43     43   
[dependencies.aws-smithy-runtime]
   44     44   
path = "../aws-smithy-runtime"
   45     45   
features = ["client"]
   46         -
version = "1.8.4"
          46  +
version = "1.8.5"
   47     47   
   48     48   
[dependencies.aws-smithy-runtime-api]
   49     49   
path = "../aws-smithy-runtime-api"
   50     50   
features = ["client", "http-02x"]
   51         -
version = "1.8.3"
          51  +
version = "1.8.4"
   52     52   
   53     53   
[dependencies.aws-smithy-types]
   54     54   
path = "../aws-smithy-types"
   55     55   
version = "1.3.2"
   56     56   
   57     57   
[dependencies.aws-types]
   58     58   
path = "../aws-types"
   59         -
version = "1.3.7"
          59  +
version = "1.3.8"
   60     60   
   61     61   
[dependencies.bytes]
   62     62   
version = "1.4.0"
   63     63   
   64     64   
[dependencies.fastrand]
   65     65   
version = "2.0.0"
   66     66   
   67     67   
[dependencies.http]
   68     68   
version = "0.2.9"
   69     69   
   70     70   
[dependencies.regex-lite]
   71     71   
version = "0.1.5"
   72     72   
   73     73   
[dependencies.tracing]
   74     74   
version = "0.1"
   75     75   
[dev-dependencies.aws-config]
   76     76   
path = "../aws-config"
   77         -
version = "1.8.2"
          77  +
version = "1.8.3"
   78     78   
   79     79   
[dev-dependencies.aws-credential-types]
   80     80   
path = "../aws-credential-types"
   81     81   
features = ["test-util"]
   82     82   
version = "1.2.4"
   83     83   
   84     84   
[dev-dependencies.tokio]
   85     85   
version = "1.23.1"
   86     86   
features = ["macros", "test-util", "rt-multi-thread"]
   87     87   

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/config.rs

@@ -36,36 +95,99 @@
   56     56   
    }
   57     57   
    /// Return the auth schemes configured on this service config
   58     58   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   59     59   
        self.runtime_components.auth_schemes()
   60     60   
    }
   61     61   
   62     62   
    /// Return the auth scheme resolver configured on this service config
   63     63   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   64     64   
        self.runtime_components.auth_scheme_option_resolver()
   65     65   
    }
          66  +
    /// Returns the configured auth scheme preference
          67  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          68  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          69  +
    }
   66     70   
    /// Returns the endpoint resolver.
   67     71   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   68     72   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   69     73   
    }
   70     74   
    /// Return a reference to the retry configuration contained in this config, if any.
   71     75   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   72     76   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   73     77   
    }
   74     78   
   75     79   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -149,153 +208,213 @@
  169    173   
    ///
  170    174   
    pub fn new() -> Self {
  171    175   
        Self::default()
  172    176   
    }
  173    177   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  174    178   
    /// but not those in runtime components.
  175    179   
    #[allow(unused)]
  176    180   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  177    181   
        let mut builder = Self::new();
  178    182   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         183  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  179    184   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  180    185   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  181    186   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  182    187   
        builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned());
  183    188   
        builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()));
  184    189   
        builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0));
  185    190   
        builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0));
  186    191   
        builder.set_region(config_bag.load::<crate::config::Region>().cloned());
  187    192   
        builder
  188    193   
    }
@@ -398,403 +457,519 @@
  418    423   
  419    424   
    /// Set the auth scheme resolver for the builder
  420    425   
    ///
  421    426   
    /// # Examples
  422    427   
    /// See an example for [`Self::auth_scheme_resolver`].
  423    428   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  424    429   
        self.runtime_components
  425    430   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  426    431   
        self
  427    432   
    }
         433  +
    /// Set the auth scheme preference for an auth scheme resolver
         434  +
    /// (typically the default auth scheme resolver).
         435  +
    ///
         436  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         437  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         438  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         439  +
    ///
         440  +
    /// The preference list is intended as a hint rather than a strict override.
         441  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         442  +
    ///
         443  +
    /// # Examples
         444  +
    ///
         445  +
    /// ```no_run
         446  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         447  +
    /// let config = aws_sdk_bedrockruntime::Config::builder()
         448  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         449  +
    ///     // ...
         450  +
    ///     .build();
         451  +
    /// let client = aws_sdk_bedrockruntime::Client::from_conf(config);
         452  +
    /// ```
         453  +
         454  +
    pub fn auth_scheme_preference(
         455  +
        mut self,
         456  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         457  +
    ) -> Self {
         458  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         459  +
        self
         460  +
    }
         461  +
         462  +
    /// Set the auth scheme preference for an auth scheme resolver
         463  +
    /// (typically the default auth scheme resolver).
         464  +
    ///
         465  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         466  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         467  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         468  +
    ///
         469  +
    /// The preference list is intended as a hint rather than a strict override.
         470  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         471  +
    ///
         472  +
    /// # Examples
         473  +
    ///
         474  +
    /// ```no_run
         475  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         476  +
    /// let config = aws_sdk_bedrockruntime::Config::builder()
         477  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         478  +
    ///     // ...
         479  +
    ///     .build();
         480  +
    /// let client = aws_sdk_bedrockruntime::Client::from_conf(config);
         481  +
    /// ```
         482  +
         483  +
    pub fn set_auth_scheme_preference(
         484  +
        &mut self,
         485  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         486  +
    ) -> &mut Self {
         487  +
        self.config.store_or_unset(preference);
         488  +
        self
         489  +
    }
  428    490   
    /// Sets the endpoint resolver to use when making requests.
  429    491   
    ///
  430    492   
    ///
  431    493   
    /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
  432    494   
    /// rules for `aws_sdk_bedrockruntime`.
  433    495   
    ///
  434    496   
    ///
  435    497   
    /// Note: setting an endpoint resolver will replace any endpoint URL that has been set.
  436    498   
    /// This method accepts an endpoint resolver [specific to this service](crate::config::endpoint::ResolveEndpoint). If you want to
  437    499   
    /// provide a shared endpoint resolver, use [`Self::set_endpoint_resolver`].
@@ -1389,1451 +1448,1511 @@
 1409   1471   
            );
 1410   1472   
        }
 1411   1473   
        // resiliency
 1412   1474   
        builder.set_retry_config(input.retry_config().cloned());
 1413   1475   
        builder.set_timeout_config(input.timeout_config().cloned());
 1414   1476   
        builder.set_sleep_impl(input.sleep_impl());
 1415   1477   
 1416   1478   
        builder.set_http_client(input.http_client());
 1417   1479   
        builder.set_time_source(input.time_source());
 1418   1480   
        builder.set_behavior_version(input.behavior_version());
        1481  +
        builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
 1419   1482   
        // setting `None` here removes the default
 1420   1483   
        if let Some(config) = input.stalled_stream_protection() {
 1421   1484   
            builder.set_stalled_stream_protection(Some(config));
 1422   1485   
        }
 1423   1486   
 1424   1487   
        if let Some(cache) = input.identity_cache() {
 1425   1488   
            builder.set_identity_cache(cache);
 1426   1489   
        }
 1427   1490   
        builder.set_app_name(input.app_name().cloned());
 1428   1491   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/Cargo.toml

@@ -16,16 +146,146 @@
   36     36   
features = ["event-stream"]
   37     37   
version = "0.62.1"
   38     38   
   39     39   
[dependencies.aws-smithy-json]
   40     40   
path = "../aws-smithy-json"
   41     41   
version = "0.61.4"
   42     42   
   43     43   
[dependencies.aws-smithy-runtime]
   44     44   
path = "../aws-smithy-runtime"
   45     45   
features = ["client"]
   46         -
version = "1.8.4"
          46  +
version = "1.8.5"
   47     47   
   48     48   
[dependencies.aws-smithy-runtime-api]
   49     49   
path = "../aws-smithy-runtime-api"
   50     50   
features = ["client", "http-02x"]
   51         -
version = "1.8.3"
          51  +
version = "1.8.4"
   52     52   
   53     53   
[dependencies.aws-smithy-types]
   54     54   
path = "../aws-smithy-types"
   55     55   
version = "1.3.2"
   56     56   
   57     57   
[dependencies.aws-types]
   58     58   
path = "../aws-types"
   59         -
version = "1.3.7"
          59  +
version = "1.3.8"
   60     60   
   61     61   
[dependencies.bytes]
   62     62   
version = "1.4.0"
   63     63   
   64     64   
[dependencies.fastrand]
   65     65   
version = "2.0.0"
   66     66   
   67     67   
[dependencies.http]
   68     68   
version = "0.2.9"
   69     69   
   70     70   
[dependencies.regex-lite]
   71     71   
version = "0.1.5"
   72     72   
   73     73   
[dependencies.tracing]
   74     74   
version = "0.1"
   75     75   
[dev-dependencies.aws-config]
   76     76   
path = "../aws-config"
   77         -
version = "1.8.2"
          77  +
version = "1.8.3"
   78     78   
   79     79   
[dev-dependencies.aws-credential-types]
   80     80   
path = "../aws-credential-types"
   81     81   
features = ["test-util"]
   82     82   
version = "1.2.4"
   83     83   
   84     84   
[dev-dependencies.aws-runtime]
   85     85   
path = "../aws-runtime"
   86     86   
features = ["test-util"]
   87     87   
version = "1.5.9"
   88     88   
   89     89   
[dev-dependencies.aws-smithy-async]
   90     90   
path = "../aws-smithy-async"
   91     91   
features = ["test-util"]
   92     92   
version = "1.2.5"
   93     93   
   94     94   
[dev-dependencies.aws-smithy-eventstream]
   95     95   
path = "../aws-smithy-eventstream"
   96     96   
features = ["test-util"]
   97     97   
version = "0.60.9"
   98     98   
   99     99   
[dev-dependencies.aws-smithy-http-client]
  100    100   
path = "../aws-smithy-http-client"
  101    101   
features = ["test-util", "wire-mock"]
  102    102   
version = "1.0.6"
  103    103   
  104    104   
[dev-dependencies.aws-smithy-protocol-test]
  105    105   
path = "../aws-smithy-protocol-test"
  106    106   
version = "0.63.4"
  107    107   
  108    108   
[dev-dependencies.aws-smithy-runtime]
  109    109   
path = "../aws-smithy-runtime"
  110    110   
features = ["test-util"]
  111         -
version = "1.8.4"
         111  +
version = "1.8.5"
  112    112   
  113    113   
[dev-dependencies.aws-smithy-runtime-api]
  114    114   
path = "../aws-smithy-runtime-api"
  115    115   
features = ["test-util"]
  116         -
version = "1.8.3"
         116  +
version = "1.8.4"
  117    117   
  118    118   
[dev-dependencies.aws-smithy-types]
  119    119   
path = "../aws-smithy-types"
  120    120   
features = ["test-util"]
  121    121   
version = "1.3.2"
  122    122   
  123    123   
[dev-dependencies.futures-util]
  124    124   
version = "0.3.25"
  125    125   
features = ["alloc"]
  126    126   
default-features = false

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/config.rs

@@ -36,36 +95,99 @@
   56     56   
    }
   57     57   
    /// Return the auth schemes configured on this service config
   58     58   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   59     59   
        self.runtime_components.auth_schemes()
   60     60   
    }
   61     61   
   62     62   
    /// Return the auth scheme resolver configured on this service config
   63     63   
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
   64     64   
        self.runtime_components.auth_scheme_option_resolver()
   65     65   
    }
          66  +
    /// Returns the configured auth scheme preference
          67  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          68  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          69  +
    }
   66     70   
    /// Returns the endpoint resolver.
   67     71   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   68     72   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   69     73   
    }
   70     74   
    /// Return a reference to the retry configuration contained in this config, if any.
   71     75   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   72     76   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   73     77   
    }
   74     78   
   75     79   
    /// Return a cloned shared async sleep implementation from this config, if any.
@@ -149,153 +208,213 @@
  169    173   
    ///
  170    174   
    pub fn new() -> Self {
  171    175   
        Self::default()
  172    176   
    }
  173    177   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  174    178   
    /// but not those in runtime components.
  175    179   
    #[allow(unused)]
  176    180   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  177    181   
        let mut builder = Self::new();
  178    182   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         183  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  179    184   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  180    185   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  181    186   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  182    187   
        builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned());
  183    188   
        builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()));
  184    189   
        builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0));
  185    190   
        builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0));
  186    191   
        builder.set_region(config_bag.load::<crate::config::Region>().cloned());
  187    192   
        builder
  188    193   
    }
@@ -414,419 +473,535 @@
  434    439   
  435    440   
    /// Set the auth scheme resolver for the builder
  436    441   
    ///
  437    442   
    /// # Examples
  438    443   
    /// See an example for [`Self::auth_scheme_resolver`].
  439    444   
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
  440    445   
        self.runtime_components
  441    446   
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
  442    447   
        self
  443    448   
    }
         449  +
    /// Set the auth scheme preference for an auth scheme resolver
         450  +
    /// (typically the default auth scheme resolver).
         451  +
    ///
         452  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         453  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         454  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         455  +
    ///
         456  +
    /// The preference list is intended as a hint rather than a strict override.
         457  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         458  +
    ///
         459  +
    /// # Examples
         460  +
    ///
         461  +
    /// ```no_run
         462  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         463  +
    /// let config = aws_sdk_cloudwatchlogs::Config::builder()
         464  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         465  +
    ///     // ...
         466  +
    ///     .build();
         467  +
    /// let client = aws_sdk_cloudwatchlogs::Client::from_conf(config);
         468  +
    /// ```
         469  +
         470  +
    pub fn auth_scheme_preference(
         471  +
        mut self,
         472  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         473  +
    ) -> Self {
         474  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         475  +
        self
         476  +
    }
         477  +
         478  +
    /// Set the auth scheme preference for an auth scheme resolver
         479  +
    /// (typically the default auth scheme resolver).
         480  +
    ///
         481  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         482  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         483  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         484  +
    ///
         485  +
    /// The preference list is intended as a hint rather than a strict override.
         486  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         487  +
    ///
         488  +
    /// # Examples
         489  +
    ///
         490  +
    /// ```no_run
         491  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         492  +
    /// let config = aws_sdk_cloudwatchlogs::Config::builder()
         493  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         494  +
    ///     // ...
         495  +
    ///     .build();
         496  +
    /// let client = aws_sdk_cloudwatchlogs::Client::from_conf(config);
         497  +
    /// ```
         498  +
         499  +
    pub fn set_auth_scheme_preference(
         500  +
        &mut self,
         501  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         502  +
    ) -> &mut Self {
         503  +
        self.config.store_or_unset(preference);
         504  +
        self
         505  +
    }
  444    506   
    /// Sets the endpoint resolver to use when making requests.
  445    507   
    ///
  446    508   
    ///
  447    509   
    /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
  448    510   
    /// rules for `aws_sdk_cloudwatchlogs`.
  449    511   
    ///
  450    512   
    ///
  451    513   
    /// Note: setting an endpoint resolver will replace any endpoint URL that has been set.
  452    514   
    /// This method accepts an endpoint resolver [specific to this service](crate::config::endpoint::ResolveEndpoint). If you want to
  453    515   
    /// provide a shared endpoint resolver, use [`Self::set_endpoint_resolver`].
@@ -1407,1469 +1466,1529 @@
 1427   1489   
            );
 1428   1490   
        }
 1429   1491   
        // resiliency
 1430   1492   
        builder.set_retry_config(input.retry_config().cloned());
 1431   1493   
        builder.set_timeout_config(input.timeout_config().cloned());
 1432   1494   
        builder.set_sleep_impl(input.sleep_impl());
 1433   1495   
 1434   1496   
        builder.set_http_client(input.http_client());
 1435   1497   
        builder.set_time_source(input.time_source());
 1436   1498   
        builder.set_behavior_version(input.behavior_version());
        1499  +
        builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
 1437   1500   
        // setting `None` here removes the default
 1438   1501   
        if let Some(config) = input.stalled_stream_protection() {
 1439   1502   
            builder.set_stalled_stream_protection(Some(config));
 1440   1503   
        }
 1441   1504   
 1442   1505   
        if let Some(cache) = input.identity_cache() {
 1443   1506   
            builder.set_identity_cache(cache);
 1444   1507   
        }
 1445   1508   
        builder.set_app_name(input.app_name().cloned());
 1446   1509