AWS SDK

AWS SDK

rev. f6356c10a335c46b7f149fcf1eaedbf60e39c8d5 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/upload_part_copy.rs

@@ -99,99 +161,167 @@
  119    119   
        #[allow(unused_mut)]
  120    120   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UploadPartCopy")
  121    121   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  122    122   
            .with_interceptor(UploadPartCopyEndpointParamsInterceptor)
  123    123   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  124    124   
                crate::operation::upload_part_copy::UploadPartCopyError,
  125    125   
            >::new())
  126    126   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  127    127   
                crate::operation::upload_part_copy::UploadPartCopyError,
  128    128   
            >::new())
  129         -
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
  130         -
                crate::operation::upload_part_copy::UploadPartCopyError,
  131         -
            >::new());
         129  +
            .with_retry_classifier(
         130  +
                ::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<crate::operation::upload_part_copy::UploadPartCopyError>::builder()
         131  +
                    .transient_errors({
         132  +
                        let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
         133  +
                        transient_errors.push("InternalError");
         134  +
                        ::std::borrow::Cow::Owned(transient_errors)
         135  +
                    })
         136  +
                    .build(),
         137  +
            );
  132    138   
  133    139   
        ::std::borrow::Cow::Owned(rcb)
  134    140   
    }
  135    141   
}
  136    142   
  137    143   
#[derive(Debug)]
  138    144   
struct UploadPartCopyResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UploadPartCopyResponseDeserializer {
  140    146   
    fn deserialize_nonstreaming(
  141    147   
        &self,

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/write_get_object_response.rs

@@ -92,92 +163,172 @@
  112    112   
        });
  113    113   
  114    114   
        ::std::option::Option::Some(cfg.freeze())
  115    115   
    }
  116    116   
  117    117   
    fn runtime_components(
  118    118   
        &self,
  119    119   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    120   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    121   
        #[allow(unused_mut)]
  122         -
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("WriteGetObjectResponse")
         122  +
        let mut rcb =
         123  +
            ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("WriteGetObjectResponse")
  123    124   
                .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    125   
                .with_interceptor(WriteGetObjectResponseEndpointParamsInterceptor)
  125    126   
                .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    127   
                    crate::operation::write_get_object_response::WriteGetObjectResponseError,
  127    128   
                >::new())
  128    129   
                .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    130   
                    crate::operation::write_get_object_response::WriteGetObjectResponseError,
  130    131   
                >::new())
  131         -
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         132  +
                .with_retry_classifier(
         133  +
                    ::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
  132    134   
                        crate::operation::write_get_object_response::WriteGetObjectResponseError,
  133         -
            >::new());
         135  +
                    >::builder()
         136  +
                    .transient_errors({
         137  +
                        let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
         138  +
                        transient_errors.push("InternalError");
         139  +
                        ::std::borrow::Cow::Owned(transient_errors)
         140  +
                    })
         141  +
                    .build(),
         142  +
                );
  134    143   
  135    144   
        ::std::borrow::Cow::Owned(rcb)
  136    145   
    }
  137    146   
}
  138    147   
  139    148   
#[derive(Debug)]
  140    149   
struct WriteGetObjectResponseResponseDeserializer;
  141    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for WriteGetObjectResponseResponseDeserializer {
  142    151   
    fn deserialize_nonstreaming(
  143    152   
        &self,

tmp-codegen-diff/aws-sdk/sdk/s3/tests/status-200-errors.rs

@@ -1,1 +0,87 @@
    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  +
use aws_config::retry::{RetryConfigBuilder, RetryMode};
    6      7   
use aws_credential_types::provider::SharedCredentialsProvider;
    7      8   
use aws_credential_types::Credentials;
    8      9   
use aws_sdk_s3::Client;
    9     10   
use aws_smithy_runtime::assert_str_contains;
   10     11   
use aws_smithy_runtime::client::http::test_util::infallible_client_fn;
   11     12   
use aws_smithy_types::body::SdkBody;
   12     13   
use aws_smithy_types::error::metadata::ProvideErrorMetadata;
   13     14   
use aws_types::region::Region;
   14     15   
use aws_types::SdkConfig;
   15     16   
   16     17   
const ERROR_RESPONSE: &str = r#"<?xml version="1.0" encoding="UTF-8"?>
   17     18   
        <Error>
   18     19   
            <Code>SlowDown</Code>
   19     20   
            <Message>Please reduce your request rate.</Message>
   20     21   
            <RequestId>K2H6N7ZGQT6WHCEG</RequestId>
   21     22   
            <HostId>WWoZlnK4pTjKCYn6eNV7GgOurabfqLkjbSyqTvDMGBaI9uwzyNhSaDhOCPs8paFGye7S6b/AB3A=</HostId>
   22     23   
        </Error>
   23     24   
"#;
   24     25   
   25     26   
#[tokio::test]
   26     27   
async fn status_200_errors() {
   27     28   
    let http_client =
   28     29   
        infallible_client_fn(|_req| http::Response::new(SdkBody::from(ERROR_RESPONSE)));
   29     30   
    let sdk_config = SdkConfig::builder()
   30     31   
        .credentials_provider(SharedCredentialsProvider::new(Credentials::for_tests()))
   31     32   
        .region(Region::new("us-west-4"))
   32     33   
        .http_client(http_client)
   33     34   
        .build();
   34     35   
    let client = Client::new(&sdk_config);
   35     36   
    let error = client
   36     37   
        .delete_objects()
   37     38   
        .bucket("bucket")
   38     39   
        .send()
   39     40   
        .await
   40     41   
        .expect_err("should fail");
   41     42   
    assert_eq!(error.as_service_error().unwrap().code(), Some("SlowDown"));
   42     43   
    assert_str_contains!(format!("{:?}", error), "Please reduce your request rate");
   43     44   
}
          45  +
          46  +
#[tracing_test::traced_test]
          47  +
#[tokio::test]
          48  +
async fn retry_200_internal_error() {
          49  +
    let http_client = infallible_client_fn(|_req| {
          50  +
        http::Response::new(SdkBody::from(
          51  +
            r#"<?xml version="1.0" encoding="UTF-8"?>
          52  +
            <Error>
          53  +
                <Type>Server</Type>
          54  +
                <Code>InternalError</Code>
          55  +
                <Message>>We encountered an internal error. Please try again.</Message>
          56  +
                <RequestId>DOESNOTMATTER</RequestId>
          57  +
            </Error>
          58  +
        "#,
          59  +
        ))
          60  +
    });
          61  +
    let sdk_config = SdkConfig::builder()
          62  +
        .credentials_provider(SharedCredentialsProvider::new(Credentials::for_tests()))
          63  +
        .region(Region::new("us-west-4"))
          64  +
        .http_client(http_client)
          65  +
        .retry_config(
          66  +
            RetryConfigBuilder::new()
          67  +
                .max_attempts(2)
          68  +
                .mode(RetryMode::Standard)
          69  +
                .build(),
          70  +
        )
          71  +
        .build();
          72  +
    let client = Client::new(&sdk_config);
          73  +
    let error = client
          74  +
        .delete_objects()
          75  +
        .bucket("bucket")
          76  +
        .send()
          77  +
        .await
          78  +
        .expect_err("should fail");
          79  +
    assert_eq!(
          80  +
        error.as_service_error().unwrap().code(),
          81  +
        Some("InternalError")
          82  +
    );
          83  +
    assert!(
          84  +
        logs_contain("retrying after")
          85  +
            && logs_contain("set the result of classification to 'retry transient error error'")
          86  +
    );
          87  +
}

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

@@ -1,1 +53,53 @@
   13     13   
codegen-version = "ci"
   14     14   
[package.metadata.docs.rs]
   15     15   
all-features = true
   16     16   
targets = ["x86_64-unknown-linux-gnu"]
   17     17   
[dependencies.aws-credential-types]
   18     18   
path = "../aws-credential-types"
   19     19   
version = "1.2.0"
   20     20   
   21     21   
[dependencies.aws-runtime]
   22     22   
path = "../aws-runtime"
   23         -
version = "1.2.3"
          23  +
version = "1.3.0"
   24     24   
   25     25   
[dependencies.aws-smithy-async]
   26     26   
path = "../aws-smithy-async"
   27     27   
version = "1.2.1"
   28     28   
   29     29   
[dependencies.aws-smithy-http]
   30     30   
path = "../aws-smithy-http"
   31     31   
version = "0.60.8"
   32     32   
   33     33   
[dependencies.aws-smithy-json]
@@ -61,61 +121,121 @@
   81     81   
version = "1.5.2"
   82     82   
   83     83   
[dev-dependencies.aws-credential-types]
   84     84   
path = "../aws-credential-types"
   85     85   
features = ["test-util"]
   86     86   
version = "1.2.0"
   87     87   
   88     88   
[dev-dependencies.aws-runtime]
   89     89   
path = "../aws-runtime"
   90     90   
features = ["test-util"]
   91         -
version = "1.2.3"
          91  +
version = "1.3.0"
   92     92   
   93     93   
[dev-dependencies.aws-smithy-async]
   94     94   
path = "../aws-smithy-async"
   95     95   
features = ["test-util"]
   96     96   
version = "1.2.1"
   97     97   
   98     98   
[dev-dependencies.aws-smithy-protocol-test]
   99     99   
path = "../aws-smithy-protocol-test"
  100    100   
version = "0.60.7"
  101    101   

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

@@ -1,1 +53,53 @@
   13     13   
codegen-version = "ci"
   14     14   
[package.metadata.docs.rs]
   15     15   
all-features = true
   16     16   
targets = ["x86_64-unknown-linux-gnu"]
   17     17   
[dependencies.aws-credential-types]
   18     18   
path = "../aws-credential-types"
   19     19   
version = "1.2.0"
   20     20   
   21     21   
[dependencies.aws-runtime]
   22     22   
path = "../aws-runtime"
   23         -
version = "1.2.3"
          23  +
version = "1.3.0"
   24     24   
   25     25   
[dependencies.aws-smithy-async]
   26     26   
path = "../aws-smithy-async"
   27     27   
version = "1.2.1"
   28     28   
   29     29   
[dependencies.aws-smithy-http]
   30     30   
path = "../aws-smithy-http"
   31     31   
version = "0.60.8"
   32     32   
   33     33   
[dependencies.aws-smithy-json]

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

@@ -1,1 +53,53 @@
   13     13   
codegen-version = "ci"
   14     14   
[package.metadata.docs.rs]
   15     15   
all-features = true
   16     16   
targets = ["x86_64-unknown-linux-gnu"]
   17     17   
[dependencies.aws-credential-types]
   18     18   
path = "../aws-credential-types"
   19     19   
version = "1.2.0"
   20     20   
   21     21   
[dependencies.aws-runtime]
   22     22   
path = "../aws-runtime"
   23         -
version = "1.2.3"
          23  +
version = "1.3.0"
   24     24   
   25     25   
[dependencies.aws-smithy-async]
   26     26   
path = "../aws-smithy-async"
   27     27   
version = "1.2.1"
   28     28   
   29     29   
[dependencies.aws-smithy-http]
   30     30   
path = "../aws-smithy-http"
   31     31   
version = "0.60.8"
   32     32   
   33     33   
[dependencies.aws-smithy-json]

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

@@ -1,1 +112,112 @@
   13     13   
codegen-version = "ci"
   14     14   
[package.metadata.docs.rs]
   15     15   
all-features = true
   16     16   
targets = ["x86_64-unknown-linux-gnu"]
   17     17   
[dependencies.aws-credential-types]
   18     18   
path = "../aws-credential-types"
   19     19   
version = "1.2.0"
   20     20   
   21     21   
[dependencies.aws-runtime]
   22     22   
path = "../aws-runtime"
   23         -
version = "1.2.3"
          23  +
version = "1.3.0"
   24     24   
   25     25   
[dependencies.aws-smithy-async]
   26     26   
path = "../aws-smithy-async"
   27     27   
version = "1.2.1"
   28     28   
   29     29   
[dependencies.aws-smithy-http]
   30     30   
path = "../aws-smithy-http"
   31     31   
version = "0.60.8"
   32     32   
   33     33   
[dependencies.aws-smithy-json]
   34     34   
path = "../aws-smithy-json"
   35     35   
version = "0.60.7"
   36     36   
   37     37   
[dependencies.aws-smithy-query]
   38     38   
path = "../aws-smithy-query"
   39     39   
version = "0.60.7"
   40     40   
   41     41   
[dependencies.aws-smithy-runtime]
   42     42   
path = "../aws-smithy-runtime"
   43     43   
features = ["client"]
   44     44   
version = "1.6.0"
   45     45   
   46     46   
[dependencies.aws-smithy-runtime-api]
   47     47   
path = "../aws-smithy-runtime-api"
   48     48   
features = ["client", "http-02x"]
   49     49   
version = "1.7.0"
   50     50   
   51     51   
[dependencies.aws-smithy-types]
   52     52   
path = "../aws-smithy-types"
   53     53   
version = "1.2.0"
   54     54   
   55     55   
[dependencies.aws-smithy-xml]
   56     56   
path = "../aws-smithy-xml"
   57     57   
version = "0.60.8"
   58     58   
   59     59   
[dependencies.aws-types]
   60     60   
path = "../aws-types"
   61     61   
version = "1.3.1"
   62     62   
   63     63   
[dependencies.http]
   64     64   
version = "0.2.9"
   65     65   
   66     66   
[dependencies.once_cell]
   67     67   
version = "1.16"
   68     68   
   69     69   
[dependencies.regex-lite]
   70     70   
version = "0.1.5"
   71     71   
   72     72   
[dependencies.tracing]
   73     73   
version = "0.1"
   74     74   
[dev-dependencies.aws-credential-types]
   75     75   
path = "../aws-credential-types"
   76     76   
features = ["test-util"]
   77     77   
version = "1.2.0"
   78     78   
   79     79   
[dev-dependencies.aws-runtime]
   80     80   
path = "../aws-runtime"
   81     81   
features = ["test-util"]
   82         -
version = "1.2.3"
          82  +
version = "1.3.0"
   83     83   
   84     84   
[dev-dependencies.aws-smithy-async]
   85     85   
path = "../aws-smithy-async"
   86     86   
features = ["test-util"]
   87     87   
version = "1.2.1"
   88     88   
   89     89   
[dev-dependencies.aws-smithy-protocol-test]
   90     90   
path = "../aws-smithy-protocol-test"
   91     91   
version = "0.60.7"
   92     92   

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

@@ -1,1 +53,53 @@
   13     13   
codegen-version = "ci"
   14     14   
[package.metadata.docs.rs]
   15     15   
all-features = true
   16     16   
targets = ["x86_64-unknown-linux-gnu"]
   17     17   
[dependencies.aws-credential-types]
   18     18   
path = "../aws-credential-types"
   19     19   
version = "1.2.0"
   20     20   
   21     21   
[dependencies.aws-runtime]
   22     22   
path = "../aws-runtime"
   23         -
version = "1.2.3"
          23  +
version = "1.3.0"
   24     24   
   25     25   
[dependencies.aws-smithy-async]
   26     26   
path = "../aws-smithy-async"
   27     27   
version = "1.2.1"
   28     28   
   29     29   
[dependencies.aws-smithy-http]
   30     30   
path = "../aws-smithy-http"
   31     31   
version = "0.60.8"
   32     32   
   33     33   
[dependencies.aws-smithy-json]
@@ -58,58 +118,118 @@
   78     78   
version = "1.5.2"
   79     79   
   80     80   
[dev-dependencies.aws-credential-types]
   81     81   
path = "../aws-credential-types"
   82     82   
features = ["test-util"]
   83     83   
version = "1.2.0"
   84     84   
   85     85   
[dev-dependencies.aws-runtime]
   86     86   
path = "../aws-runtime"
   87     87   
features = ["test-util"]
   88         -
version = "1.2.3"
          88  +
version = "1.3.0"
   89     89   
   90     90   
[dev-dependencies.aws-smithy-async]
   91     91   
path = "../aws-smithy-async"
   92     92   
features = ["test-util"]
   93     93   
version = "1.2.1"
   94     94   
   95     95   
[dev-dependencies.aws-smithy-protocol-test]
   96     96   
path = "../aws-smithy-protocol-test"
   97     97   
version = "0.60.7"
   98     98   

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

@@ -1,1 +53,53 @@
   13     13   
codegen-version = "ci"
   14     14   
[package.metadata.docs.rs]
   15     15   
all-features = true
   16     16   
targets = ["x86_64-unknown-linux-gnu"]
   17     17   
[dependencies.aws-credential-types]
   18     18   
path = "../aws-credential-types"
   19     19   
version = "1.2.0"
   20     20   
   21     21   
[dependencies.aws-runtime]
   22     22   
path = "../aws-runtime"
   23         -
version = "1.2.3"
          23  +
version = "1.3.0"
   24     24   
   25     25   
[dependencies.aws-smithy-async]
   26     26   
path = "../aws-smithy-async"
   27     27   
version = "1.2.1"
   28     28   
   29     29   
[dependencies.aws-smithy-http]
   30     30   
path = "../aws-smithy-http"
   31     31   
version = "0.60.8"
   32     32   
   33     33   
[dependencies.aws-smithy-json]

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

@@ -1,1 +54,54 @@
   14     14   
[package.metadata.docs.rs]
   15     15   
all-features = true
   16     16   
targets = ["x86_64-unknown-linux-gnu"]
   17     17   
[dependencies.aws-credential-types]
   18     18   
path = "../aws-credential-types"
   19     19   
version = "1.2.0"
   20     20   
   21     21   
[dependencies.aws-runtime]
   22     22   
path = "../aws-runtime"
   23     23   
features = ["event-stream"]
   24         -
version = "1.2.3"
          24  +
version = "1.3.0"
   25     25   
   26     26   
[dependencies.aws-sigv4]
   27     27   
path = "../aws-sigv4"
   28     28   
version = "1.2.2"
   29     29   
   30     30   
[dependencies.aws-smithy-async]
   31     31   
path = "../aws-smithy-async"
   32     32   
version = "1.2.1"
   33     33   
   34     34   
[dependencies.aws-smithy-eventstream]
@@ -69,69 +129,129 @@
   89     89   
version = "1.5.2"
   90     90   
   91     91   
[dev-dependencies.aws-credential-types]
   92     92   
path = "../aws-credential-types"
   93     93   
features = ["test-util"]
   94     94   
version = "1.2.0"
   95     95   
   96     96   
[dev-dependencies.aws-runtime]
   97     97   
path = "../aws-runtime"
   98     98   
features = ["test-util"]
   99         -
version = "1.2.3"
          99  +
version = "1.3.0"
  100    100   
  101    101   
[dev-dependencies.aws-smithy-async]
  102    102   
path = "../aws-smithy-async"
  103    103   
features = ["test-util"]
  104    104   
version = "1.2.1"
  105    105   
  106    106   
[dev-dependencies.aws-smithy-protocol-test]
  107    107   
path = "../aws-smithy-protocol-test"
  108    108   
version = "0.60.7"
  109    109