AWS SDK

AWS SDK

rev. 590dc25d9814e856f33ea7f0ae5eb368d5cdff81

Files changed:

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

@@ -1,1 +56,56 @@
   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         -
default-http-connector = ["dep:aws-smithy-http-client", "aws-smithy-http-client?/rustls-aws-lc"]
          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"
   34     34   
fastrand = "2.0.0"
   35     35   
httparse = "1.8.0"
   36     36   
once_cell = "1.18.0"

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

@@ -25,25 +93,125 @@
   45     45   
fn layer<LayerFn>(name: &'static str, layer_fn: LayerFn) -> FrozenLayer
   46     46   
where
   47     47   
    LayerFn: FnOnce(&mut Layer),
   48     48   
{
   49     49   
    let mut layer = Layer::new(name);
   50     50   
    (layer_fn)(&mut layer);
   51     51   
    layer.freeze()
   52     52   
}
   53     53   
   54     54   
/// Runtime plugin that provides a default connector.
          55  +
#[deprecated(
          56  +
    since = "1.8.0",
          57  +
    note = "This function wasn't intended to be public, and didn't take the behavior major version as an argument, so it couldn't be evolved over time."
          58  +
)]
   55     59   
pub fn default_http_client_plugin() -> Option<SharedRuntimePlugin> {
   56         -
    let _default: Option<SharedHttpClient> = None;
   57     60   
    #[allow(deprecated)]
   58         -
    #[cfg(feature = "connector-hyper-0-14-x")]
   59         -
    let _default = crate::client::http::hyper_014::default_client();
          61  +
    default_http_client_plugin_v2(BehaviorVersion::v2024_03_28())
          62  +
}
          63  +
          64  +
/// Runtime plugin that provides a default HTTPS connector.
          65  +
pub fn default_http_client_plugin_v2(
          66  +
    behavior_version: BehaviorVersion,
          67  +
) -> Option<SharedRuntimePlugin> {
          68  +
    let mut _default: Option<SharedHttpClient> = None;
   60     69   
   61         -
    // takes precedence over legacy connector if enabled
   62         -
    #[cfg(feature = "default-http-connector")]
   63         -
    let _default = aws_smithy_http_client::default_client();
          70  +
    if behavior_version.is_at_least(BehaviorVersion::v2025_01_17()) {
          71  +
        // the latest https stack takes precedence if the config flag
          72  +
        // is enabled otherwise try to fall back to the legacy connector
          73  +
        // if that feature flag is available.
          74  +
        #[cfg(all(
          75  +
            feature = "connector-hyper-0-14-x",
          76  +
            not(feature = "default-https-client")
          77  +
        ))]
          78  +
        #[allow(deprecated)]
          79  +
        {
          80  +
            _default = crate::client::http::hyper_014::default_client();
          81  +
        }
          82  +
          83  +
        // takes precedence over legacy connector if enabled
          84  +
        #[cfg(feature = "default-https-client")]
          85  +
        {
          86  +
            _default = aws_smithy_http_client::default_client();
          87  +
        }
          88  +
    } else {
          89  +
        // fallback to legacy hyper client for given behavior version
          90  +
        #[cfg(feature = "connector-hyper-0-14-x")]
          91  +
        #[allow(deprecated)]
          92  +
        {
          93  +
            _default = crate::client::http::hyper_014::default_client();
          94  +
        }
          95  +
    }
   64     96   
   65     97   
    _default.map(|default| {
   66     98   
        default_plugin("default_http_client_plugin", |components| {
   67     99   
            components.with_http_client(Some(default))
   68    100   
        })
   69    101   
        .into_shared()
   70    102   
    })
   71    103   
}
   72    104   
   73    105   
/// Runtime plugin that provides a default async sleep implementation.
@@ -176,208 +235,268 @@
  196    228   
            |components| {
  197    229   
                components.with_config_validator(SharedConfigValidator::base_client_config_fn(
  198    230   
                    validate_stalled_stream_protection_config,
  199    231   
                ))
  200    232   
            },
  201    233   
        )
  202    234   
        .with_config(layer("default_stalled_stream_protection_config", |layer| {
  203    235   
            let mut config =
  204    236   
                StalledStreamProtectionConfig::enabled().grace_period(Duration::from_secs(5));
  205    237   
            // Before v2024_03_28, upload streams did not have stalled stream protection by default
         238  +
            #[allow(deprecated)]
  206    239   
            if !behavior_version.is_at_least(BehaviorVersion::v2024_03_28()) {
  207    240   
                config = config.upload_enabled(false);
  208    241   
            }
  209    242   
            layer.store_put(config.build());
  210    243   
        }))
  211    244   
        .into_shared(),
  212    245   
    )
  213    246   
}
  214    247   
  215    248   
fn enforce_content_length_runtime_plugin() -> Option<SharedRuntimePlugin> {
@@ -255,288 +315,348 @@
  275    308   
  276    309   
/// All default plugins.
  277    310   
pub fn default_plugins(
  278    311   
    params: DefaultPluginParams,
  279    312   
) -> impl IntoIterator<Item = SharedRuntimePlugin> {
  280    313   
    let behavior_version = params
  281    314   
        .behavior_version
  282    315   
        .unwrap_or_else(BehaviorVersion::latest);
  283    316   
  284    317   
    [
  285         -
        default_http_client_plugin(),
         318  +
        default_http_client_plugin_v2(behavior_version),
  286    319   
        default_identity_cache_plugin(),
  287    320   
        default_retry_config_plugin(
  288    321   
            params
  289    322   
                .retry_partition_name
  290    323   
                .expect("retry_partition_name is required"),
  291    324   
        ),
  292    325   
        default_sleep_impl_plugin(),
  293    326   
        default_time_source_plugin(),
  294    327   
        default_timeout_config_plugin(),
  295    328   
        enforce_content_length_runtime_plugin(),

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

@@ -17,17 +54,54 @@
   37     37   
        pub use aws_smithy_http_client::test_util::wire::matcher;
   38     38   
        pub use aws_smithy_http_client::test_util::wire::*;
   39     39   
    }
   40     40   
}
   41     41   
   42     42   
/// Default HTTP and TLS connectors that use hyper 0.14.x and rustls.
   43     43   
///
   44     44   
/// This module is named after the hyper version number since we anticipate
   45     45   
/// needing to provide equivalent functionality for hyper 1.x in the future.
   46     46   
#[cfg(feature = "connector-hyper-0-14-x")]
   47         -
#[deprecated = "hyper 0.14.x connector is deprecated, please use the connector-hyper-1-x feature instead"]
          47  +
#[deprecated = "hyper 0.14.x connector is deprecated, please use the `aws-smithy-http-client` crate directly instead."]
   48     48   
pub mod hyper_014 {
   49     49   
    #[allow(deprecated)]
   50     50   
    pub use aws_smithy_http_client::hyper_014::*;
   51     51   
}
   52     52   
   53     53   
/// HTTP body and body-wrapper types
   54     54   
pub mod body;

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

@@ -352,352 +412,412 @@
  372    372   
    }
  373    373   
  374    374   
    // The connection consumes the request but we need to keep a copy of it
  375    375   
    // within the interceptor context, so we clone it here.
  376    376   
    ctx.enter_transmit_phase();
  377    377   
    let response = halt_on_err!([ctx] => {
  378    378   
        let request = ctx.take_request().expect("set during serialization");
  379    379   
        trace!(request = ?request, "transmitting request");
  380    380   
        let http_client = halt_on_err!([ctx] => runtime_components.http_client().ok_or_else(||
  381    381   
            OrchestratorError::other("No HTTP client was available to send this request. \
  382         -
                Enable the `default-http-connector` crate feature or configure an HTTP client to fix this.")
         382  +
                Enable the `default-https-client` crate feature or configure an HTTP client to fix this.")
  383    383   
        ));
  384    384   
        let timeout_config = cfg.load::<TimeoutConfig>().expect("timeout config must be set");
  385    385   
        let settings = {
  386    386   
            let mut builder = HttpConnectorSettings::builder();
  387    387   
            builder.set_connect_timeout(timeout_config.connect_timeout());
  388    388   
            builder.set_read_timeout(timeout_config.read_timeout());
  389    389   
            builder.build()
  390    390   
        };
  391    391   
        let connector = http_client.http_connector(&settings, runtime_components);
  392    392   
        let response_future = MaybeUploadThroughputCheckFuture::new(

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

@@ -373,373 +433,433 @@
  393    393   
  394    394   
        #[cfg(debug_assertions)]
  395    395   
        {
  396    396   
            let mut config = ConfigBag::base();
  397    397   
            let components = runtime_plugins
  398    398   
                .apply_client_configuration(&mut config)
  399    399   
                .expect("the runtime plugins should succeed");
  400    400   
  401    401   
            assert!(
  402    402   
                components.http_client().is_some(),
  403         -
                "a http_client is required. Enable the `default-http-connector` crate feature or configure an HTTP client to fix this."
         403  +
                "a http_client is required. Enable the `default-https-client` crate feature or configure an HTTP client to fix this."
  404    404   
            );
  405    405   
            assert!(
  406    406   
                components.endpoint_resolver().is_some(),
  407    407   
                "a endpoint_resolver is required"
  408    408   
            );
  409    409   
            assert!(
  410    410   
                components.retry_strategy().is_some(),
  411    411   
                "a retry_strategy is required"
  412    412   
            );
  413    413   
            assert!(

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

@@ -59,59 +0,94 @@
   79     79   
path = "../aws-credential-types"
   80     80   
features = ["test-util"]
   81     81   
version = "1.2.1"
   82     82   
   83     83   
[dev-dependencies.tokio]
   84     84   
version = "1.23.1"
   85     85   
features = ["macros", "test-util", "rt-multi-thread"]
   86     86   
   87     87   
[features]
   88     88   
behavior-version-latest = []
   89         -
rustls = ["aws-smithy-runtime/default-http-connector"]
          89  +
rustls = ["aws-smithy-runtime/tls-rustls"]
          90  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
   90     91   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   91     92   
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
   92     93   
gated-tests = []
   93         -
default = ["rustls", "rt-tokio"]
          94  +
default = ["rustls", "default-https-client", "rt-tokio"]

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

@@ -107,107 +0,142 @@
  127    127   
[dev-dependencies.tokio]
  128    128   
version = "1.23.1"
  129    129   
features = ["macros", "test-util", "rt-multi-thread"]
  130    130   
  131    131   
[dev-dependencies.tracing-subscriber]
  132    132   
version = "0.3.16"
  133    133   
features = ["env-filter", "json"]
  134    134   
  135    135   
[features]
  136    136   
behavior-version-latest = []
  137         -
rustls = ["aws-smithy-runtime/default-http-connector"]
         137  +
rustls = ["aws-smithy-runtime/tls-rustls"]
         138  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
  138    139   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
  139    140   
test-util = ["aws-smithy-runtime/test-util"]
  140    141   
gated-tests = []
  141         -
default = ["rustls", "rt-tokio"]
         142  +
default = ["rustls", "default-https-client", "rt-tokio"]

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

@@ -54,54 +0,89 @@
   74     74   
path = "../aws-credential-types"
   75     75   
features = ["test-util"]
   76     76   
version = "1.2.1"
   77     77   
   78     78   
[dev-dependencies.tokio]
   79     79   
version = "1.23.1"
   80     80   
features = ["macros", "test-util", "rt-multi-thread"]
   81     81   
   82     82   
[features]
   83     83   
behavior-version-latest = []
   84         -
rustls = ["aws-smithy-runtime/default-http-connector"]
          84  +
rustls = ["aws-smithy-runtime/tls-rustls"]
          85  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
   85     86   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   86     87   
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
   87     88   
gated-tests = []
   88         -
default = ["rustls", "rt-tokio"]
          89  +
default = ["rustls", "default-https-client", "rt-tokio"]

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

@@ -113,113 +0,148 @@
  133    133   
[dev-dependencies.tokio]
  134    134   
version = "1.23.1"
  135    135   
features = ["macros", "test-util", "rt-multi-thread"]
  136    136   
  137    137   
[dev-dependencies.tracing-subscriber]
  138    138   
version = "0.3.16"
  139    139   
features = ["env-filter", "json"]
  140    140   
  141    141   
[features]
  142    142   
behavior-version-latest = []
  143         -
rustls = ["aws-smithy-runtime/default-http-connector"]
         143  +
rustls = ["aws-smithy-runtime/tls-rustls"]
         144  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
  144    145   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
  145    146   
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
  146    147   
gated-tests = []
  147         -
default = ["rustls", "rt-tokio"]
         148  +
default = ["rustls", "default-https-client", "rt-tokio"]

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

@@ -112,112 +0,147 @@
  132    132   
[dev-dependencies.tokio]
  133    133   
version = "1.23.1"
  134    134   
features = ["macros", "test-util", "rt-multi-thread"]
  135    135   
  136    136   
[dev-dependencies.tracing-subscriber]
  137    137   
version = "0.3.16"
  138    138   
features = ["env-filter", "json"]
  139    139   
  140    140   
[features]
  141    141   
behavior-version-latest = []
  142         -
rustls = ["aws-smithy-runtime/default-http-connector"]
         142  +
rustls = ["aws-smithy-runtime/tls-rustls"]
         143  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
  143    144   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
  144    145   
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
  145    146   
gated-tests = []
  146         -
default = ["rustls", "rt-tokio"]
         147  +
default = ["rustls", "default-https-client", "rt-tokio"]

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

@@ -57,57 +0,92 @@
   77     77   
path = "../aws-credential-types"
   78     78   
features = ["test-util"]
   79     79   
version = "1.2.1"
   80     80   
   81     81   
[dev-dependencies.tokio]
   82     82   
version = "1.23.1"
   83     83   
features = ["macros", "test-util", "rt-multi-thread"]
   84     84   
   85     85   
[features]
   86     86   
behavior-version-latest = []
   87         -
rustls = ["aws-smithy-runtime/default-http-connector"]
          87  +
rustls = ["aws-smithy-runtime/tls-rustls"]
          88  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
   88     89   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   89     90   
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
   90     91   
gated-tests = []
   91         -
default = ["rustls", "rt-tokio"]
          92  +
default = ["rustls", "default-https-client", "rt-tokio"]

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

@@ -121,121 +0,156 @@
  141    141   
[dev-dependencies.tracing-subscriber]
  142    142   
version = "0.3.16"
  143    143   
features = ["env-filter", "json"]
  144    144   
  145    145   
[dev-dependencies.tracing-test]
  146    146   
version = "0.2.5"
  147    147   
features = ["no-env-filter"]
  148    148   
  149    149   
[features]
  150    150   
behavior-version-latest = []
  151         -
rustls = ["aws-smithy-runtime/default-http-connector"]
         151  +
rustls = ["aws-smithy-runtime/tls-rustls"]
         152  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
  152    153   
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
  153    154   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
  154    155   
gated-tests = []
  155         -
default = ["rustls", "rt-tokio"]
         156  +
default = ["rustls", "default-https-client", "rt-tokio"]

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

@@ -109,109 +0,144 @@
  129    129   
[dev-dependencies.tokio]
  130    130   
version = "1.23.1"
  131    131   
features = ["macros", "test-util", "rt-multi-thread"]
  132    132   
  133    133   
[dev-dependencies.tracing-subscriber]
  134    134   
version = "0.3.16"
  135    135   
features = ["env-filter", "json"]
  136    136   
  137    137   
[features]
  138    138   
behavior-version-latest = []
  139         -
rustls = ["aws-smithy-runtime/default-http-connector"]
         139  +
rustls = ["aws-smithy-runtime/tls-rustls"]
         140  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
  140    141   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
  141    142   
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
  142    143   
gated-tests = []
  143         -
default = ["rustls", "rt-tokio"]
         144  +
default = ["rustls", "default-https-client", "rt-tokio"]

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

@@ -104,104 +0,139 @@
  124    124   
[dev-dependencies.tokio]
  125    125   
version = "1.23.1"
  126    126   
features = ["macros", "test-util", "rt-multi-thread"]
  127    127   
  128    128   
[dev-dependencies.tracing-subscriber]
  129    129   
version = "0.3.16"
  130    130   
features = ["env-filter", "json"]
  131    131   
  132    132   
[features]
  133    133   
behavior-version-latest = []
  134         -
rustls = ["aws-smithy-runtime/default-http-connector"]
         134  +
rustls = ["aws-smithy-runtime/tls-rustls"]
         135  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
  135    136   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
  136    137   
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
  137    138   
gated-tests = []
  138         -
default = ["rustls", "rt-tokio"]
         139  +
default = ["rustls", "default-https-client", "rt-tokio"]

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

@@ -110,110 +0,145 @@
  130    130   
[dev-dependencies.tokio]
  131    131   
version = "1.23.1"
  132    132   
features = ["macros", "test-util", "rt-multi-thread"]
  133    133   
  134    134   
[dev-dependencies.tracing-subscriber]
  135    135   
version = "0.3.16"
  136    136   
features = ["env-filter", "json"]
  137    137   
  138    138   
[features]
  139    139   
behavior-version-latest = []
  140         -
rustls = ["aws-smithy-runtime/default-http-connector"]
         140  +
rustls = ["aws-smithy-runtime/tls-rustls"]
         141  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
  141    142   
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
  142    143   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
  143    144   
gated-tests = []
  144         -
default = ["rustls", "rt-tokio"]
         145  +
default = ["rustls", "default-https-client", "rt-tokio"]

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

@@ -114,114 +0,149 @@
  134    134   
version = "1.23.1"
  135    135   
features = ["macros", "test-util", "rt-multi-thread"]
  136    136   
  137    137   
[dev-dependencies.tracing-subscriber]
  138    138   
version = "0.3.16"
  139    139   
features = ["env-filter", "json"]
  140    140   
  141    141   
[features]
  142    142   
http-1x = ["dep:http-body-1x", "aws-smithy-runtime-api/http-1x"]
  143    143   
behavior-version-latest = []
  144         -
rustls = ["aws-smithy-runtime/default-http-connector"]
         144  +
rustls = ["aws-smithy-runtime/tls-rustls"]
         145  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
  145    146   
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
  146    147   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
  147    148   
gated-tests = []
  148         -
default = ["rustls", "rt-tokio"]
         149  +
default = ["rustls", "default-https-client", "rt-tokio"]