AWS SDK

AWS SDK

rev. bf994e5317a2d7d4199f53f90ea78c77747cc898

Files changed:

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/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::config::endpoint::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/transcribestreaming/src/config/endpoint.rs

@@ -1,1 +35,57 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub use ::aws_smithy_runtime_api::client::endpoint::EndpointFuture;
    3      3   
pub use ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver;
    4      4   
pub use ::aws_smithy_types::endpoint::Endpoint;
    5      5   
           6  +
/// Interceptor that tracks endpoint override business metric.
           7  +
#[derive(Debug, Default)]
           8  +
pub(crate) struct EndpointOverrideFeatureTrackerInterceptor;
           9  +
          10  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for EndpointOverrideFeatureTrackerInterceptor {
          11  +
    fn name(&self) -> &'static str {
          12  +
        "EndpointOverrideFeatureTrackerInterceptor"
          13  +
    }
          14  +
          15  +
    fn read_before_execution(
          16  +
        &self,
          17  +
        _context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<'_>,
          18  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
          19  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
          20  +
        if cfg.load::<::aws_types::endpoint_config::EndpointUrl>().is_some() {
          21  +
            cfg.interceptor_state()
          22  +
                .store_append(::aws_runtime::sdk_feature::AwsSdkFeature::EndpointOverride);
          23  +
        }
          24  +
        ::std::result::Result::Ok(())
          25  +
    }
          26  +
}
          27  +
    6     28   
#[cfg(test)]
    7     29   
mod test {
    8     30   
    9     31   
    /// For region ap-northeast-1 with FIPS disabled and DualStack disabled
   10     32   
    #[test]
   11     33   
    fn test_1() {
   12     34   
        let params = crate::config::endpoint::Params::builder()
   13     35   
            .region("ap-northeast-1".to_string())
   14     36   
            .use_fips(false)
   15     37   
            .use_dual_stack(false)