AWS SDK

AWS SDK

rev. f02053cf7a0ef0f53ece16ac662490c0b70fd1eb (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/s3/tests/client_construction.rs

@@ -13,13 +50,55 @@
   33     33   
    #[test]
   34     34   
    fn bytestream_from_path_exists() {
   35     35   
        let _ = aws_sdk_s3::primitives::ByteStream::from_path("a/b.txt");
   36     36   
    }
   37     37   
}
   38     38   
   39     39   
mod with_service_config {
   40     40   
    use aws_sdk_s3 as s3;
   41     41   
   42     42   
    #[test]
          43  +
    #[allow(deprecated)]
   43     44   
    fn manual_config_construction_all_defaults() {
   44         -
        // When manually constructing `Config` with everything unset,
   45         -
        // it should work since there will be no timeouts or retries enabled,
          45  +
        // When manually constructing `Config` with everything unset and using an older
          46  +
        // behavior version, it should work since there will be no timeouts or retries enabled,
   46     47   
        // and thus, no sleep impl is required.
   47         -
        let config = s3::Config::builder().build();
          48  +
        let config = s3::Config::builder()
          49  +
            .behavior_version(
          50  +
                aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::v2024_03_28(),
          51  +
            )
          52  +
            .build();
   48     53   
        let _s3 = s3::Client::from_conf(config);
   49     54   
    }
   50     55   
}

tmp-codegen-diff/aws-sdk/sdk/s3/tests/data/content-length-enforcement/get-object-long.json

@@ -1,1 +56,56 @@
   16     16   
                            "x-amz-date": [
   17     17   
                                "20090213T233130Z"
   18     18   
                            ],
   19     19   
                            "authorization": [
   20     20   
                                "AWS4-HMAC-SHA256 Credential=ANOTREAL/20090213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-user-agent, Signature=62edebbcadc277f9482344af1467f4a48e9fe852585382f3a50c141421697c6b"
   21     21   
                            ],
   22     22   
                            "x-amz-content-sha256": [
   23     23   
                                "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
   24     24   
                            ],
   25     25   
                            "amz-sdk-request": [
   26         -
                                "attempt=1; max=1"
          26  +
                                "attempt=1; max=3"
   27     27   
                            ]
   28     28   
                        },
   29     29   
                        "method": "GET"
   30     30   
                    }
   31     31   
                }
   32     32   
            }
   33     33   
        },
   34     34   
        {
   35     35   
            "connection_id": 0,
   36     36   
            "action": {

tmp-codegen-diff/aws-sdk/sdk/s3/tests/data/content-length-enforcement/get-object-short.json

@@ -1,1 +56,56 @@
   16     16   
                            "x-amz-date": [
   17     17   
                                "20090213T233130Z"
   18     18   
                            ],
   19     19   
                            "authorization": [
   20     20   
                                "AWS4-HMAC-SHA256 Credential=ANOTREAL/20090213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-user-agent, Signature=62edebbcadc277f9482344af1467f4a48e9fe852585382f3a50c141421697c6b"
   21     21   
                            ],
   22     22   
                            "x-amz-content-sha256": [
   23     23   
                                "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
   24     24   
                            ],
   25     25   
                            "amz-sdk-request": [
   26         -
                                "attempt=1; max=1"
          26  +
                                "attempt=1; max=3"
   27     27   
                            ]
   28     28   
                        },
   29     29   
                        "method": "GET"
   30     30   
                    }
   31     31   
                }
   32     32   
            }
   33     33   
        },
   34     34   
        {
   35     35   
            "connection_id": 0,
   36     36   
            "action": {

tmp-codegen-diff/aws-sdk/sdk/s3/tests/data/content-length-enforcement/head-object.json

@@ -1,1 +56,56 @@
   16     16   
                            "x-amz-date": [
   17     17   
                                "20090213T233130Z"
   18     18   
                            ],
   19     19   
                            "authorization": [
   20     20   
                                "AWS4-HMAC-SHA256 Credential=ANOTREAL/20090213/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-user-agent, Signature=6d5c92e11af515195eb16138091fee14bfda1213466804a292ba29c164e6cc99"
   21     21   
                            ],
   22     22   
                            "x-amz-content-sha256": [
   23     23   
                                "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
   24     24   
                            ],
   25     25   
                            "amz-sdk-request": [
   26         -
                                "attempt=1; max=1"
          26  +
                                "attempt=1; max=3"
   27     27   
                            ]
   28     28   
                        },
   29     29   
                        "method": "HEAD"
   30     30   
                    }
   31     31   
                }
   32     32   
            }
   33     33   
        },
   34     34   
        {
   35     35   
            "connection_id": 0,
   36     36   
            "action": {

tmp-codegen-diff/aws-sdk/sdk/s3/tests/request_id.rs

@@ -1,1 +38,41 @@
    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 aws_sdk_s3::operation::get_object::GetObjectError;
    7      7   
use aws_sdk_s3::operation::{RequestId, RequestIdExt};
    8         -
use aws_sdk_s3::{config::Credentials, config::Region, Client, Config};
           8  +
use aws_sdk_s3::{
           9  +
    config::{retry::RetryConfig, Credentials, Region},
          10  +
    Client, Config,
          11  +
};
    9     12   
use aws_smithy_http_client::test_util::capture_request;
   10     13   
use aws_smithy_types::body::SdkBody;
   11     14   
   12     15   
#[tokio::test]
   13     16   
async fn get_request_id_from_modeled_error() {
   14     17   
    let (http_client, request) = capture_request(Some(
   15     18   
        http_1x::Response::builder()
   16     19   
            .header("x-amz-request-id", "correct-request-id")
   17     20   
            .header("x-amz-id-2", "correct-extended-request-id")
   18     21   
            .status(404)
@@ -54,57 +113,117 @@
   74     77   
                  <Resource>/mybucket/myfoto.jpg</Resource>
   75     78   
                  <RequestId>incorrect-request-id</RequestId>
   76     79   
                </Error>"#,
   77     80   
            ))
   78     81   
            .unwrap(),
   79     82   
    ));
   80     83   
    let config = Config::builder()
   81     84   
        .http_client(http_client)
   82     85   
        .credentials_provider(Credentials::for_tests())
   83     86   
        .region(Region::new("us-east-1"))
          87  +
        .retry_config(RetryConfig::disabled())
   84     88   
        .build();
   85     89   
    let client = Client::from_conf(config);
   86     90   
    let err = client
   87     91   
        .get_object()
   88     92   
        .bucket("dontcare")
   89     93   
        .key("dontcare")
   90     94   
        .send()
   91     95   
        .await
   92     96   
        .expect_err("status 500")
   93     97   
        .into_service_error();

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/associate_access_grants_identity_center/builders.rs

@@ -56,56 +116,117 @@
   76     76   
    pub fn as_input(&self) -> &crate::operation::associate_access_grants_identity_center::builders::AssociateAccessGrantsIdentityCenterInputBuilder {
   77     77   
        &self.inner
   78     78   
    }
   79     79   
    /// Sends the request and returns the response.
   80     80   
    ///
   81     81   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   82     82   
    /// can be matched against.
   83     83   
    ///
   84     84   
    /// By default, any retryable failures will be retried twice. Retry behavior
   85     85   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   86         -
    /// set when configuring the client.
          86  +
    /// set when configuring the client. Note: retries are enabled by default when using
          87  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   87     88   
    pub async fn send(
   88     89   
        self,
   89     90   
    ) -> ::std::result::Result<
   90     91   
        crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterOutput,
   91     92   
        ::aws_smithy_runtime_api::client::result::SdkError<
   92     93   
            crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterError,
   93     94   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   94     95   
        >,
   95     96   
    > {
   96     97   
        let input = self

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/create_access_grant/builders.rs

@@ -58,58 +118,119 @@
   78     78   
    pub fn as_input(&self) -> &crate::operation::create_access_grant::builders::CreateAccessGrantInputBuilder {
   79     79   
        &self.inner
   80     80   
    }
   81     81   
    /// Sends the request and returns the response.
   82     82   
    ///
   83     83   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   84     84   
    /// can be matched against.
   85     85   
    ///
   86     86   
    /// By default, any retryable failures will be retried twice. Retry behavior
   87     87   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   88         -
    /// set when configuring the client.
          88  +
    /// set when configuring the client. Note: retries are enabled by default when using
          89  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   89     90   
    pub async fn send(
   90     91   
        self,
   91     92   
    ) -> ::std::result::Result<
   92     93   
        crate::operation::create_access_grant::CreateAccessGrantOutput,
   93     94   
        ::aws_smithy_runtime_api::client::result::SdkError<
   94     95   
            crate::operation::create_access_grant::CreateAccessGrantError,
   95     96   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   96     97   
        >,
   97     98   
    > {
   98     99   
        let input = self

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/create_access_grants_instance/builders.rs

@@ -56,56 +116,117 @@
   76     76   
    pub fn as_input(&self) -> &crate::operation::create_access_grants_instance::builders::CreateAccessGrantsInstanceInputBuilder {
   77     77   
        &self.inner
   78     78   
    }
   79     79   
    /// Sends the request and returns the response.
   80     80   
    ///
   81     81   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   82     82   
    /// can be matched against.
   83     83   
    ///
   84     84   
    /// By default, any retryable failures will be retried twice. Retry behavior
   85     85   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   86         -
    /// set when configuring the client.
          86  +
    /// set when configuring the client. Note: retries are enabled by default when using
          87  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   87     88   
    pub async fn send(
   88     89   
        self,
   89     90   
    ) -> ::std::result::Result<
   90     91   
        crate::operation::create_access_grants_instance::CreateAccessGrantsInstanceOutput,
   91     92   
        ::aws_smithy_runtime_api::client::result::SdkError<
   92     93   
            crate::operation::create_access_grants_instance::CreateAccessGrantsInstanceError,
   93     94   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   94     95   
        >,
   95     96   
    > {
   96     97   
        let input = self

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/create_access_grants_location/builders.rs

@@ -68,68 +128,129 @@
   88     88   
    pub fn as_input(&self) -> &crate::operation::create_access_grants_location::builders::CreateAccessGrantsLocationInputBuilder {
   89     89   
        &self.inner
   90     90   
    }
   91     91   
    /// Sends the request and returns the response.
   92     92   
    ///
   93     93   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   94     94   
    /// can be matched against.
   95     95   
    ///
   96     96   
    /// By default, any retryable failures will be retried twice. Retry behavior
   97     97   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   98         -
    /// set when configuring the client.
          98  +
    /// set when configuring the client. Note: retries are enabled by default when using
          99  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   99    100   
    pub async fn send(
  100    101   
        self,
  101    102   
    ) -> ::std::result::Result<
  102    103   
        crate::operation::create_access_grants_location::CreateAccessGrantsLocationOutput,
  103    104   
        ::aws_smithy_runtime_api::client::result::SdkError<
  104    105   
            crate::operation::create_access_grants_location::CreateAccessGrantsLocationError,
  105    106   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  106    107   
        >,
  107    108   
    > {
  108    109   
        let input = self

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/create_access_point/builders.rs

@@ -60,60 +120,121 @@
   80     80   
    pub fn as_input(&self) -> &crate::operation::create_access_point::builders::CreateAccessPointInputBuilder {
   81     81   
        &self.inner
   82     82   
    }
   83     83   
    /// Sends the request and returns the response.
   84     84   
    ///
   85     85   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   86     86   
    /// can be matched against.
   87     87   
    ///
   88     88   
    /// By default, any retryable failures will be retried twice. Retry behavior
   89     89   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   90         -
    /// set when configuring the client.
          90  +
    /// set when configuring the client. Note: retries are enabled by default when using
          91  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   91     92   
    pub async fn send(
   92     93   
        self,
   93     94   
    ) -> ::std::result::Result<
   94     95   
        crate::operation::create_access_point::CreateAccessPointOutput,
   95     96   
        ::aws_smithy_runtime_api::client::result::SdkError<
   96     97   
            crate::operation::create_access_point::CreateAccessPointError,
   97     98   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   98     99   
        >,
   99    100   
    > {
  100    101   
        let input = self

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/create_access_point_for_object_lambda/builders.rs

@@ -54,54 +114,115 @@
   74     74   
    pub fn as_input(&self) -> &crate::operation::create_access_point_for_object_lambda::builders::CreateAccessPointForObjectLambdaInputBuilder {
   75     75   
        &self.inner
   76     76   
    }
   77     77   
    /// Sends the request and returns the response.
   78     78   
    ///
   79     79   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   80     80   
    /// can be matched against.
   81     81   
    ///
   82     82   
    /// By default, any retryable failures will be retried twice. Retry behavior
   83     83   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   84         -
    /// set when configuring the client.
          84  +
    /// set when configuring the client. Note: retries are enabled by default when using
          85  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   85     86   
    pub async fn send(
   86     87   
        self,
   87     88   
    ) -> ::std::result::Result<
   88     89   
        crate::operation::create_access_point_for_object_lambda::CreateAccessPointForObjectLambdaOutput,
   89     90   
        ::aws_smithy_runtime_api::client::result::SdkError<
   90     91   
            crate::operation::create_access_point_for_object_lambda::CreateAccessPointForObjectLambdaError,
   91     92   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   92     93   
        >,
   93     94   
    > {
   94     95   
        let input = self

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/create_bucket/builders.rs

@@ -66,66 +126,127 @@
   86     86   
    pub fn as_input(&self) -> &crate::operation::create_bucket::builders::CreateBucketInputBuilder {
   87     87   
        &self.inner
   88     88   
    }
   89     89   
    /// Sends the request and returns the response.
   90     90   
    ///
   91     91   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   92     92   
    /// can be matched against.
   93     93   
    ///
   94     94   
    /// By default, any retryable failures will be retried twice. Retry behavior
   95     95   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   96         -
    /// set when configuring the client.
          96  +
    /// set when configuring the client. Note: retries are enabled by default when using
          97  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   97     98   
    pub async fn send(
   98     99   
        self,
   99    100   
    ) -> ::std::result::Result<
  100    101   
        crate::operation::create_bucket::CreateBucketOutput,
  101    102   
        ::aws_smithy_runtime_api::client::result::SdkError<
  102    103   
            crate::operation::create_bucket::CreateBucketError,
  103    104   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  104    105   
        >,
  105    106   
    > {
  106    107   
        let input = self

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/create_job/builders.rs

@@ -59,59 +119,120 @@
   79     79   
    pub fn as_input(&self) -> &crate::operation::create_job::builders::CreateJobInputBuilder {
   80     80   
        &self.inner
   81     81   
    }
   82     82   
    /// Sends the request and returns the response.
   83     83   
    ///
   84     84   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   85     85   
    /// can be matched against.
   86     86   
    ///
   87     87   
    /// By default, any retryable failures will be retried twice. Retry behavior
   88     88   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   89         -
    /// set when configuring the client.
          89  +
    /// set when configuring the client. Note: retries are enabled by default when using
          90  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   90     91   
    pub async fn send(
   91     92   
        self,
   92     93   
    ) -> ::std::result::Result<
   93     94   
        crate::operation::create_job::CreateJobOutput,
   94     95   
        ::aws_smithy_runtime_api::client::result::SdkError<
   95     96   
            crate::operation::create_job::CreateJobError,
   96     97   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   97     98   
        >,
   98     99   
    > {
   99    100   
        let input = self

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/create_multi_region_access_point/builders.rs

@@ -58,58 +118,119 @@
   78     78   
    pub fn as_input(&self) -> &crate::operation::create_multi_region_access_point::builders::CreateMultiRegionAccessPointInputBuilder {
   79     79   
        &self.inner
   80     80   
    }
   81     81   
    /// Sends the request and returns the response.
   82     82   
    ///
   83     83   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   84     84   
    /// can be matched against.
   85     85   
    ///
   86     86   
    /// By default, any retryable failures will be retried twice. Retry behavior
   87     87   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   88         -
    /// set when configuring the client.
          88  +
    /// set when configuring the client. Note: retries are enabled by default when using
          89  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   89     90   
    pub async fn send(
   90     91   
        self,
   91     92   
    ) -> ::std::result::Result<
   92     93   
        crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointOutput,
   93     94   
        ::aws_smithy_runtime_api::client::result::SdkError<
   94     95   
            crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointError,
   95     96   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   96     97   
        >,
   97     98   
    > {
   98     99   
        let input = self

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/create_storage_lens_group/builders.rs

@@ -44,44 +104,105 @@
   64     64   
    pub fn as_input(&self) -> &crate::operation::create_storage_lens_group::builders::CreateStorageLensGroupInputBuilder {
   65     65   
        &self.inner
   66     66   
    }
   67     67   
    /// Sends the request and returns the response.
   68     68   
    ///
   69     69   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   70     70   
    /// can be matched against.
   71     71   
    ///
   72     72   
    /// By default, any retryable failures will be retried twice. Retry behavior
   73     73   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   74         -
    /// set when configuring the client.
          74  +
    /// set when configuring the client. Note: retries are enabled by default when using
          75  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   75     76   
    pub async fn send(
   76     77   
        self,
   77     78   
    ) -> ::std::result::Result<
   78     79   
        crate::operation::create_storage_lens_group::CreateStorageLensGroupOutput,
   79     80   
        ::aws_smithy_runtime_api::client::result::SdkError<
   80     81   
            crate::operation::create_storage_lens_group::CreateStorageLensGroupError,
   81     82   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   82     83   
        >,
   83     84   
    > {
   84     85   
        let input = self

tmp-codegen-diff/aws-sdk/sdk/s3control/src/operation/delete_access_grant/builders.rs

@@ -50,50 +110,111 @@
   70     70   
    pub fn as_input(&self) -> &crate::operation::delete_access_grant::builders::DeleteAccessGrantInputBuilder {
   71     71   
        &self.inner
   72     72   
    }
   73     73   
    /// Sends the request and returns the response.
   74     74   
    ///
   75     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   76     76   
    /// can be matched against.
   77     77   
    ///
   78     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   79     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   80         -
    /// set when configuring the client.
          80  +
    /// set when configuring the client. Note: retries are enabled by default when using
          81  +
    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
   81     82   
    pub async fn send(
   82     83   
        self,
   83     84   
    ) -> ::std::result::Result<
   84     85   
        crate::operation::delete_access_grant::DeleteAccessGrantOutput,
   85     86   
        ::aws_smithy_runtime_api::client::result::SdkError<
   86     87   
            crate::operation::delete_access_grant::DeleteAccessGrantError,
   87     88   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   88     89   
        >,
   89     90   
    > {
   90     91   
        let input = self