AWS SDK

AWS SDK

rev. e078d088659554866bb85a58eb655c7ecb20450d (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/aws-runtime/src/endpoint_override.rs

@@ -0,1 +0,35 @@
           1  +
/*
           2  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           3  +
 * SPDX-License-Identifier: Apache-2.0
           4  +
 */
           5  +
           6  +
//! Endpoint override detection for business metrics tracking
           7  +
           8  +
use aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
           9  +
use aws_smithy_types::config_bag::{FrozenLayer, Layer};
          10  +
          11  +
use crate::sdk_feature::AwsSdkFeature;
          12  +
          13  +
/// Runtime plugin that tracks when a custom endpoint URL has been configured.
          14  +
#[derive(Debug, Default)]
          15  +
#[non_exhaustive]
          16  +
pub struct EndpointOverrideRuntimePlugin {
          17  +
    config: Option<FrozenLayer>,
          18  +
}
          19  +
          20  +
impl EndpointOverrideRuntimePlugin {
          21  +
    /// Creates a new `EndpointOverrideRuntimePlugin` with the endpoint override feature flag set
          22  +
    pub fn new_with_feature_flag() -> Self {
          23  +
        let mut layer = Layer::new("endpoint_override");
          24  +
        layer.store_append(AwsSdkFeature::EndpointOverride);
          25  +
        Self {
          26  +
            config: Some(layer.freeze()),
          27  +
        }
          28  +
    }
          29  +
}
          30  +
          31  +
impl RuntimePlugin for EndpointOverrideRuntimePlugin {
          32  +
    fn config(&self) -> Option<FrozenLayer> {
          33  +
        self.config.clone()
          34  +
    }
          35  +
}

tmp-codegen-diff/aws-sdk/sdk/aws-runtime/src/lib.rs

@@ -1,1 +53,56 @@
   19     19   
/// Supporting code for authentication in the AWS SDK.
   20     20   
pub mod auth;
   21     21   
   22     22   
/// AWS-specific content-encoding tools
   23     23   
#[cfg(feature = "http-02x")]
   24     24   
pub mod content_encoding;
   25     25   
   26     26   
/// Supporting code for recursion detection in the AWS SDK.
   27     27   
pub mod recursion_detection;
   28     28   
          29  +
/// Supporting code for endpoint override detection in the AWS SDK.
          30  +
pub mod endpoint_override;
          31  +
   29     32   
/// Supporting code for user agent headers in the AWS SDK.
   30     33   
pub mod user_agent;
   31     34   
   32     35   
/// Supporting code for retry behavior specific to the AWS SDK.
   33     36   
pub mod retries;
   34     37   
   35     38   
/// Supporting code for invocation ID headers in the AWS SDK.
   36     39   
pub mod invocation_id;
   37     40   
   38     41   
/// Supporting code for request metadata headers in the AWS SDK.

tmp-codegen-diff/aws-sdk/sdk/aws-runtime/src/sdk_feature.rs

@@ -1,1 +31,33 @@
   17     17   
    /// An operation called with account ID mode set to disabled
   18     18   
    AccountIdModeDisabled,
   19     19   
    /// An operation called with account ID mode set to required
   20     20   
    AccountIdModeRequired,
   21     21   
    /// Indicates that an operation was called by the S3 Transfer Manager
   22     22   
    S3Transfer,
   23     23   
    /// Calling an SSO-OIDC operation as part of the SSO login flow, when using the OAuth2.0 device code grant
   24     24   
    SsoLoginDevice,
   25     25   
    /// Calling an SSO-OIDC operation as part of the SSO login flow, when using the OAuth2.0 authorization code grant
   26     26   
    SsoLoginAuth,
          27  +
    /// Indicates that a custom endpoint URL was configured
          28  +
    EndpointOverride,
   27     29   
}
   28     30   
   29     31   
impl Storable for AwsSdkFeature {
   30     32   
    type Storer = StoreAppend<Self>;
   31     33   
}

tmp-codegen-diff/aws-sdk/sdk/aws-runtime/src/user_agent/metrics.rs

@@ -207,207 +266,267 @@
  227    227   
impl ProvideBusinessMetric for AwsSdkFeature {
  228    228   
    fn provide_business_metric(&self) -> Option<BusinessMetric> {
  229    229   
        use AwsSdkFeature::*;
  230    230   
        match self {
  231    231   
            AccountIdModePreferred => Some(BusinessMetric::AccountIdModePreferred),
  232    232   
            AccountIdModeDisabled => Some(BusinessMetric::AccountIdModeDisabled),
  233    233   
            AccountIdModeRequired => Some(BusinessMetric::AccountIdModeRequired),
  234    234   
            S3Transfer => Some(BusinessMetric::S3Transfer),
  235    235   
            SsoLoginDevice => Some(BusinessMetric::SsoLoginDevice),
  236    236   
            SsoLoginAuth => Some(BusinessMetric::SsoLoginAuth),
         237  +
            EndpointOverride => Some(BusinessMetric::EndpointOverride),
  237    238   
        }
  238    239   
    }
  239    240   
}
  240    241   
  241    242   
impl ProvideBusinessMetric for AwsCredentialFeature {
  242    243   
    fn provide_business_metric(&self) -> Option<BusinessMetric> {
  243    244   
        use AwsCredentialFeature::*;
  244    245   
        match self {
  245    246   
            ResolvedAccountId => Some(BusinessMetric::ResolvedAccountId),
  246    247   
            CredentialsCode => Some(BusinessMetric::CredentialsCode),

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

@@ -1344,1344 +1403,1404 @@
 1364   1364   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 1365   1365   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1366   1366   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1367   1367   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1368   1368   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1369   1369   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
 1370   1370   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1371   1371   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1372   1372   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1373   1373   
        ));
        1374  +
        runtime_components.push_interceptor(crate::endpoint_override::EndpointOverrideFeatureTrackerInterceptor);
 1374   1375   
        Self { config, runtime_components }
 1375   1376   
    }
 1376   1377   
}
 1377   1378   
 1378   1379   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1379   1380   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1380   1381   
        self.config.clone()
 1381   1382   
    }
 1382   1383   
 1383   1384   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {

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

@@ -0,1 +0,30 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/*
           3  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           4  +
 * SPDX-License-Identifier: Apache-2.0
           5  +
 */
           6  +
           7  +
use aws_runtime::sdk_feature::AwsSdkFeature;
           8  +
use aws_smithy_runtime_api::{
           9  +
    box_error::BoxError,
          10  +
    client::interceptors::{context::BeforeSerializationInterceptorContextRef, Intercept},
          11  +
};
          12  +
use aws_smithy_types::config_bag::ConfigBag;
          13  +
use aws_types::endpoint_config::EndpointUrl;
          14  +
          15  +
/// Interceptor that tracks AWS SDK features for endpoint override.
          16  +
#[derive(Debug, Default)]
          17  +
pub(crate) struct EndpointOverrideFeatureTrackerInterceptor;
          18  +
          19  +
impl Intercept for EndpointOverrideFeatureTrackerInterceptor {
          20  +
    fn name(&self) -> &'static str {
          21  +
        "EndpointOverrideFeatureTrackerInterceptor"
          22  +
    }
          23  +
          24  +
    fn read_before_execution(&self, _context: &BeforeSerializationInterceptorContextRef<'_>, cfg: &mut ConfigBag) -> Result<(), BoxError> {
          25  +
        if cfg.load::<EndpointUrl>().is_some() {
          26  +
            cfg.interceptor_state().store_append(AwsSdkFeature::EndpointOverride);
          27  +
        }
          28  +
        Ok(())
          29  +
    }
          30  +
}

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

@@ -162,162 +213,215 @@
  182    182   
pub mod operation;
  183    183   
  184    184   
/// Primitives such as `Blob` or `DateTime` used by other types.
  185    185   
pub mod primitives;
  186    186   
  187    187   
/// Data structures used by operation inputs/outputs.
  188    188   
pub mod types;
  189    189   
  190    190   
pub(crate) mod client_idempotency_token;
  191    191   
         192  +
mod endpoint_override;
         193  +
  192    194   
mod event_receiver;
  193    195   
  194    196   
mod event_stream_serde;
  195    197   
  196    198   
mod idempotency_token;
  197    199   
  198    200   
pub(crate) mod protocol_serde;
  199    201   
  200    202   
mod sdk_feature_tracker;
  201    203   

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

@@ -1295,1295 +1354,1355 @@
 1315   1315   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 1316   1316   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1317   1317   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1318   1318   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1319   1319   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1320   1320   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
 1321   1321   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1322   1322   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1323   1323   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1324   1324   
        ));
        1325  +
        runtime_components.push_interceptor(crate::endpoint_override::EndpointOverrideFeatureTrackerInterceptor);
 1325   1326   
        Self { config, runtime_components }
 1326   1327   
    }
 1327   1328   
}
 1328   1329   
 1329   1330   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1330   1331   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1331   1332   
        self.config.clone()
 1332   1333   
    }
 1333   1334   
 1334   1335   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {

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

@@ -0,1 +0,30 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/*
           3  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           4  +
 * SPDX-License-Identifier: Apache-2.0
           5  +
 */
           6  +
           7  +
use aws_runtime::sdk_feature::AwsSdkFeature;
           8  +
use aws_smithy_runtime_api::{
           9  +
    box_error::BoxError,
          10  +
    client::interceptors::{context::BeforeSerializationInterceptorContextRef, Intercept},
          11  +
};
          12  +
use aws_smithy_types::config_bag::ConfigBag;
          13  +
use aws_types::endpoint_config::EndpointUrl;
          14  +
          15  +
/// Interceptor that tracks AWS SDK features for endpoint override.
          16  +
#[derive(Debug, Default)]
          17  +
pub(crate) struct EndpointOverrideFeatureTrackerInterceptor;
          18  +
          19  +
impl Intercept for EndpointOverrideFeatureTrackerInterceptor {
          20  +
    fn name(&self) -> &'static str {
          21  +
        "EndpointOverrideFeatureTrackerInterceptor"
          22  +
    }
          23  +
          24  +
    fn read_before_execution(&self, _context: &BeforeSerializationInterceptorContextRef<'_>, cfg: &mut ConfigBag) -> Result<(), BoxError> {
          25  +
        if cfg.load::<EndpointUrl>().is_some() {
          26  +
            cfg.interceptor_state().store_append(AwsSdkFeature::EndpointOverride);
          27  +
        }
          28  +
        Ok(())
          29  +
    }
          30  +
}

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

@@ -167,167 +218,220 @@
  187    187   
pub mod operation;
  188    188   
  189    189   
/// Primitives such as `Blob` or `DateTime` used by other types.
  190    190   
pub mod primitives;
  191    191   
  192    192   
/// Data structures used by operation inputs/outputs.
  193    193   
pub mod types;
  194    194   
  195    195   
pub(crate) mod client_idempotency_token;
  196    196   
         197  +
mod endpoint_override;
         198  +
  197    199   
mod event_receiver;
  198    200   
  199    201   
mod idempotency_token;
  200    202   
  201    203   
pub(crate) mod protocol_serde;
  202    204   
  203    205   
mod sdk_feature_tracker;
  204    206   
  205    207   
mod serialization_settings;
  206    208   

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

@@ -1293,1293 +1352,1353 @@
 1313   1313   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1314   1314   
        }));
 1315   1315   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 1316   1316   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 1317   1317   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1318   1318   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1319   1319   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1320   1320   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1321   1321   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
 1322   1322   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
        1323  +
        runtime_components.push_interceptor(crate::endpoint_override::EndpointOverrideFeatureTrackerInterceptor);
 1323   1324   
        Self { config, runtime_components }
 1324   1325   
    }
 1325   1326   
}
 1326   1327   
 1327   1328   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1328   1329   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1329   1330   
        self.config.clone()
 1330   1331   
    }
 1331   1332   
 1332   1333   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/endpoint_override.rs

@@ -0,1 +0,30 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/*
           3  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           4  +
 * SPDX-License-Identifier: Apache-2.0
           5  +
 */
           6  +
           7  +
use aws_runtime::sdk_feature::AwsSdkFeature;
           8  +
use aws_smithy_runtime_api::{
           9  +
    box_error::BoxError,
          10  +
    client::interceptors::{context::BeforeSerializationInterceptorContextRef, Intercept},
          11  +
};
          12  +
use aws_smithy_types::config_bag::ConfigBag;
          13  +
use aws_types::endpoint_config::EndpointUrl;
          14  +
          15  +
/// Interceptor that tracks AWS SDK features for endpoint override.
          16  +
#[derive(Debug, Default)]
          17  +
pub(crate) struct EndpointOverrideFeatureTrackerInterceptor;
          18  +
          19  +
impl Intercept for EndpointOverrideFeatureTrackerInterceptor {
          20  +
    fn name(&self) -> &'static str {
          21  +
        "EndpointOverrideFeatureTrackerInterceptor"
          22  +
    }
          23  +
          24  +
    fn read_before_execution(&self, _context: &BeforeSerializationInterceptorContextRef<'_>, cfg: &mut ConfigBag) -> Result<(), BoxError> {
          25  +
        if cfg.load::<EndpointUrl>().is_some() {
          26  +
            cfg.interceptor_state().store_append(AwsSdkFeature::EndpointOverride);
          27  +
        }
          28  +
        Ok(())
          29  +
    }
          30  +
}

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/lib.rs

@@ -212,212 +259,261 @@
  232    232   
pub mod operation;
  233    233   
  234    234   
/// Primitives such as `Blob` or `DateTime` used by other types.
  235    235   
pub mod primitives;
  236    236   
  237    237   
/// Data structures used by operation inputs/outputs.
  238    238   
pub mod types;
  239    239   
  240    240   
pub(crate) mod client_idempotency_token;
  241    241   
         242  +
mod endpoint_override;
         243  +
  242    244   
mod idempotency_token;
  243    245   
  244    246   
pub(crate) mod protocol_serde;
  245    247   
  246    248   
mod sdk_feature_tracker;
  247    249   
  248    250   
mod serialization_settings;
  249    251   
  250    252   
mod endpoint_lib;
  251    253   

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

@@ -1277,1277 +1336,1337 @@
 1297   1297   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 1298   1298   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1299   1299   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1300   1300   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1301   1301   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1302   1302   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
 1303   1303   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1304   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1305   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1306   
        ));
        1307  +
        runtime_components.push_interceptor(crate::endpoint_override::EndpointOverrideFeatureTrackerInterceptor);
 1307   1308   
        Self { config, runtime_components }
 1308   1309   
    }
 1309   1310   
}
 1310   1311   
 1311   1312   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1312   1313   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1313   1314   
        self.config.clone()
 1314   1315   
    }
 1315   1316   
 1316   1317   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {

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

@@ -0,1 +0,30 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/*
           3  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           4  +
 * SPDX-License-Identifier: Apache-2.0
           5  +
 */
           6  +
           7  +
use aws_runtime::sdk_feature::AwsSdkFeature;
           8  +
use aws_smithy_runtime_api::{
           9  +
    box_error::BoxError,
          10  +
    client::interceptors::{context::BeforeSerializationInterceptorContextRef, Intercept},
          11  +
};
          12  +
use aws_smithy_types::config_bag::ConfigBag;
          13  +
use aws_types::endpoint_config::EndpointUrl;
          14  +
          15  +
/// Interceptor that tracks AWS SDK features for endpoint override.
          16  +
#[derive(Debug, Default)]
          17  +
pub(crate) struct EndpointOverrideFeatureTrackerInterceptor;
          18  +
          19  +
impl Intercept for EndpointOverrideFeatureTrackerInterceptor {
          20  +
    fn name(&self) -> &'static str {
          21  +
        "EndpointOverrideFeatureTrackerInterceptor"
          22  +
    }
          23  +
          24  +
    fn read_before_execution(&self, _context: &BeforeSerializationInterceptorContextRef<'_>, cfg: &mut ConfigBag) -> Result<(), BoxError> {
          25  +
        if cfg.load::<EndpointUrl>().is_some() {
          26  +
            cfg.interceptor_state().store_append(AwsSdkFeature::EndpointOverride);
          27  +
        }
          28  +
        Ok(())
          29  +
    }
          30  +
}