AWS SDK

AWS SDK

rev. 960037ddd6baa855c43528258ed60c279b45ae58 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/README.md

@@ -1,1 +105,105 @@
    1      1   
<!--
    2      2   
IMPORTANT:
    3      3   
This README file is auto-generated by the build system in smithy-lang/smithy-rs.
    4      4   
To update it, edit the `aws/SDK_README.md.hb` Handlebars template in that repository.
    5      5   
-->
    6      6   
    7         -
# The AWS SDK for Rust [![Docs](https://img.shields.io/badge/docs-blue)](https://awslabs.github.io/aws-sdk-rust/) ![MSRV](https://img.shields.io/badge/msrv-1.82.0-red) [![Usage Guide](https://img.shields.io/badge/Developer_Guide-blue)](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html)
           7  +
# The AWS SDK for Rust [![Docs](https://img.shields.io/badge/docs-blue)](https://awslabs.github.io/aws-sdk-rust/) ![MSRV](https://img.shields.io/badge/msrv-1.85.0-red) [![Usage Guide](https://img.shields.io/badge/Developer_Guide-blue)](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html)
    8      8   
    9      9   
This repo contains the AWS SDK for Rust and its [public roadmap](https://github.com/orgs/awslabs/projects/50/views/1).
   10     10   
   11     11   
The SDK is code generated from [Smithy models](https://smithy.io/2.0/index.html) that represent each AWS service.
   12     12   
The code used to generate the SDK can be found in [smithy-rs](https://github.com/smithy-lang/smithy-rs).
   13     13   
   14     14   
## Getting Started with the SDK
   15     15   
   16     16   
> Examples are available for many services and operations, check out the [examples folder](./examples).
   17     17   
   18     18   
> For a step-by-step guide including several advanced use cases, check out the [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html).
   19     19   
   20     20   
The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio) as a dependency within your Rust project to execute asynchronous code.
   21     21   
   22     22   
1. Create a new Rust project: `cargo new sdk-example`
   23     23   
2. Add dependencies to DynamoDB and Tokio to your **Cargo.toml** file:
   24     24   
   25     25   
    ```toml
   26     26   
    [dependencies]
   27         -
    aws-config = { version= "1.6.3", features = ["behavior-version-latest"] }
          27  +
    aws-config = { version= "1.6.4", features = ["behavior-version-latest"] }
   28     28   
    aws-sdk-dynamodb = "0.0.0-local"
   29     29   
    tokio = { version = "1", features = ["full"] }
   30     30   
    ```
   31     31   
   32     32   
3. Provide your AWS credentials with the default credential provider chain, which currently looks in:
   33     33   
   - Environment variables: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_REGION`
   34     34   
   - The default credentials files located in `~/.aws/config` and `~/.aws/credentials` (location can vary per platform)
   35     35   
   - Web Identity Token credentials from the environment or container (including EKS)
   36     36   
   - ECS Container Credentials (IAM roles for tasks)
   37     37   
   - EC2 Instance Metadata Service (IAM Roles attached to instance)
   38     38   
   39     39   
4. Make a request using DynamoDB
   40     40   
   41     41   
```rust
   42     42   
use aws_sdk_dynamodb::{Client, Error};
   43     43   
   44     44   
#[tokio::main]
   45     45   
async fn main() -> Result<(), Error> {
   46     46   
    let shared_config = aws_config::load_from_env().await;
   47     47   
    let client = Client::new(&shared_config);
   48     48   
    let req = client.list_tables().limit(10);
   49     49   
    let resp = req.send().await?;
   50     50   
    println!("Current DynamoDB tables: {:?}", resp.table_names);
   51     51   
    Ok(())
   52     52   
}
   53     53   
```
   54     54   
   55     55   
### Prerequisites
   56     56   
   57     57   
In order to use the SDK, you must already have Rust and Cargo installed. If you don't, [these instructions](https://doc.rust-lang.org/book/ch01-01-installation.html) describe how to install Rust and Cargo.
   58     58   
   59     59   
## Using the SDK
   60     60   
   61     61   
Detailed usage instructions are available in the [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html).
   62     62   
Suggestions for additional sections or improvements for the guide are welcome. Please open an issue describing what you are trying to do.
   63     63   
   64     64   
## Getting Help
   65     65   
* [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html)
   66     66   
* [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
   67     67   
* [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) – For bug reports & feature requests
   68     68   
* [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
   69     69   
* [Usage examples](./examples)
   70     70   
   71     71   
## Feedback and Contributing
   72     72   
   73     73   
### Feedback
   74     74   
   75     75   
The SDK uses **GitHub Issues** to track feature requests and issues with the SDK. In addition, we use **GitHub Projects** to provide users with a high level view of our roadmap and the features we're actively working on.
   76     76   
   77     77   
You can provide feedback or report a bug  by submitting a **GitHub issue**.
   78     78   
This is the preferred mechanism to give feedback so that other users can engage in the conversation, +1 issues, etc.
   79     79   
Issues you open will be evaluated for our roadmap.
   80     80   
   81     81   
### Contributing
   82     82   
   83     83   
If you are interested in contributing to the SDK, please take a look at [CONTRIBUTING](CONTRIBUTING.md)
   84     84   
   85     85   
## Supported Rust Versions (MSRV)
   86     86   
   87         -
The SDK currently requires a minimum of Rust 1.82.0, and is not guaranteed to build on compiler versions
          87  +
The SDK currently requires a minimum of Rust 1.85.0, and is not guaranteed to build on compiler versions
   88     88   
earlier than that. We keep the minimum compiler version two releases behind the latest stable release where
   89     89   
possible (so if the latest stable were 1.55, we would support 1.53). Increases in minimum required Rust
   90     90   
version will be called out in the Release Notes for new releases of the SDK.
   91     91   
   92     92   
## Additional Resources
   93     93   
   94     94   
- Design docs - Design documentation for the SDK lives in the [design folder of smithy-rs](https://github.com/smithy-lang/smithy-rs/tree/main/design).
   95     95   
- Runtime / Handwritten code: The Rust Runtime code that underpins the SDK can be accessed [here](https://github.com/smithy-lang/smithy-rs/tree/main/rust-runtime) and [here](https://github.com/smithy-lang/smithy-rs/tree/main/aws/rust-runtime). This code is copied into this repo as part of code generation.
   96     96   
- [Code Examples](./examples)
   97     97   
- [API reference documentation (rustdoc)](https://awslabs.github.io/aws-sdk-rust/)

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

@@ -1,1 +34,34 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-config"
    4         -
version = "1.6.3"
           4  +
version = "1.6.4"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
    6      6   
description = "AWS SDK config and credential provider implementations."
    7      7   
edition = "2021"
    8      8   
exclude = ["test-data/*", "integration-tests/*"]
    9      9   
license = "Apache-2.0"
   10     10   
repository = "https://github.com/smithy-lang/smithy-rs"
   11     11   
[package.metadata.docs.rs]
   12     12   
all-features = true
   13     13   
targets = ["x86_64-unknown-linux-gnu"]
   14     14   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
@@ -106,106 +157,157 @@
  126    126   
version = "1.2.5"
  127    127   
  128    128   
[dev-dependencies.aws-smithy-runtime]
  129    129   
path = "../aws-smithy-runtime"
  130    130   
features = ["client", "test-util"]
  131    131   
version = "1.8.3"
  132    132   
  133    133   
[dev-dependencies.aws-smithy-http-client]
  134    134   
path = "../aws-smithy-http-client"
  135    135   
features = ["default-client", "test-util"]
  136         -
version = "1.0.3"
         136  +
version = "1.0.4"
  137    137   
  138    138   
[dev-dependencies.aws-smithy-runtime-api]
  139    139   
path = "../aws-smithy-runtime-api"
  140    140   
features = ["test-util"]
  141    141   
version = "1.8.0"
  142    142   
  143    143   
[dev-dependencies.futures-util]
  144    144   
version = "0.3.29"
  145    145   
default-features = false
  146    146   

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

@@ -1,1 +30,30 @@
   13     13   
edition = "2021"
   14     14   
   15     15   
[package.metadata]
   16     16   
cargo-fuzz = true
   17     17   
   18     18   
[dependencies]
   19     19   
libfuzzer-sys = "=0.4.7"
   20     20   
   21     21   
[dependencies.aws-config]
   22     22   
path = ".."
   23         -
version = "1.6.3"
          23  +
version = "1.6.4"
   24     24   
   25     25   
[dependencies.aws-types]
   26     26   
path = "../../../sdk/build/aws-sdk/sdk/aws-types"
   27     27   
version = "1.3.7"
   28     28   
   29     29   
[workspace]
   30     30   
members = ["."]

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

@@ -44,44 +104,104 @@
   64     64   
   65     65   
#[derive(PartialEq, Eq)]
   66     66   
pub(crate) struct RefreshableCredentials<'a> {
   67     67   
    pub(crate) access_key_id: Cow<'a, str>,
   68     68   
    pub(crate) secret_access_key: Cow<'a, str>,
   69     69   
    pub(crate) session_token: Cow<'a, str>,
   70     70   
    pub(crate) account_id: Option<Cow<'a, str>>,
   71     71   
    pub(crate) expiration: SystemTime,
   72     72   
}
   73     73   
   74         -
impl<'a> fmt::Debug for RefreshableCredentials<'a> {
          74  +
impl fmt::Debug for RefreshableCredentials<'_> {
   75     75   
    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
   76     76   
        let mut debug = f.debug_struct("RefreshableCredentials");
   77     77   
        debug
   78     78   
            .field("access_key_id", &self.access_key_id)
   79     79   
            .field("secret_access_key", &"** redacted **")
   80     80   
            .field("session_token", &"** redacted **");
   81     81   
        if let Some(account_id) = &self.account_id {
   82     82   
            debug.field("account_id", account_id);
   83     83   
        }
   84     84   
        debug.field("expiration", &self.expiration).finish()

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

@@ -115,115 +175,175 @@
  135    135   
    /// Load a region from this provider
  136    136   
    fn region(&self) -> future::ProvideRegion<'_>;
  137    137   
}
  138    138   
  139    139   
impl ProvideRegion for Region {
  140    140   
    fn region(&self) -> future::ProvideRegion<'_> {
  141    141   
        future::ProvideRegion::ready(Some(self.clone()))
  142    142   
    }
  143    143   
}
  144    144   
  145         -
impl<'a> ProvideRegion for &'a Region {
         145  +
impl ProvideRegion for &Region {
  146    146   
    fn region(&self) -> future::ProvideRegion<'_> {
  147    147   
        future::ProvideRegion::ready(Some((*self).clone()))
  148    148   
    }
  149    149   
}
  150    150   
  151    151   
impl ProvideRegion for Box<dyn ProvideRegion> {
  152    152   
    fn region(&self) -> future::ProvideRegion<'_> {
  153    153   
        self.as_ref().region()
  154    154   
    }
  155    155   
}

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

@@ -88,88 +144,144 @@
  108    108   
features = ["test-util"]
  109    109   
version = "1.2.3"
  110    110   
  111    111   
[dev-dependencies.aws-smithy-async]
  112    112   
path = "../aws-smithy-async"
  113    113   
features = ["test-util"]
  114    114   
version = "1.2.5"
  115    115   
  116    116   
[dev-dependencies.aws-smithy-protocol-test]
  117    117   
path = "../aws-smithy-protocol-test"
  118         -
version = "0.63.2"
         118  +
version = "0.63.3"
  119    119   
  120    120   
[dev-dependencies.aws-smithy-runtime-api]
  121    121   
path = "../aws-smithy-runtime-api"
  122    122   
features = ["test-util"]
  123    123   
version = "1.8.0"
  124    124   
  125    125   
[dev-dependencies.aws-smithy-types]
  126    126   
path = "../aws-smithy-types"
  127    127   
features = ["test-util"]
  128    128   
version = "1.3.1"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http-client/Cargo.toml

@@ -1,1 +101,101 @@
   16     16   
   17     17   
[[example]]
   18     18   
name = "custom-dns"
   19     19   
required-features = ["rustls-ring"]
   20     20   
doc-scrape-examples = true
   21     21   
   22     22   
[package]
   23     23   
name = "aws-smithy-http-client"
   24     24   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>"]
   25     25   
description = "HTTP client abstractions for generated smithy clients"
   26         -
version = "1.0.3"
          26  +
version = "1.0.4"
   27     27   
license = "Apache-2.0"
   28     28   
edition = "2021"
   29     29   
repository = "https://github.com/smithy-lang/smithy-rs"
   30     30   
[package.metadata.smithy-rs-release-tooling]
   31     31   
stable = true
   32     32   
[package.metadata.docs.rs]
   33     33   
all-features = false
   34     34   
features = ["default-client ", "wire-mock", "test-util", "rustls-ring", "rustls-aws-lc"]
   35     35   
targets = ["x86_64-unknown-linux-gnu"]
   36     36   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   37     37   
rustdoc-args = ["--cfg", "docsrs"]
   38     38   
   39     39   
[features]
   40     40   
hyper-014 = ["aws-smithy-runtime-api/http-02x", "aws-smithy-types/http-body-0-4-x", "dep:http-02x", "dep:http-body-04x", "dep:hyper-0-14", "dep:h2-0-3"]
   41     41   
default-client = ["aws-smithy-runtime-api/http-1x", "aws-smithy-types/http-body-1-x", "dep:hyper", "dep:hyper-util", "hyper-util?/client-legacy", "dep:http-1x", "dep:tower", "dep:rustls-pki-types", "dep:rustls-native-certs"]
   42     42   
wire-mock = ["test-util", "default-client", "hyper-util?/server", "hyper-util?/server-auto", "hyper-util?/service", "hyper-util?/server-graceful", "tokio/macros", "dep:http-body-util"]
   43     43   
test-util = ["dep:aws-smithy-protocol-test", "dep:serde", "dep:serde_json", "dep:indexmap", "dep:bytes", "dep:http-1x", "aws-smithy-runtime-api/http-1x", "dep:http-body-1x", "aws-smithy-types/http-body-1-x", "tokio/rt"]
   44     44   
legacy-test-util = ["test-util", "dep:http-02x", "aws-smithy-runtime-api/http-02x", "aws-smithy-types/http-body-0-4-x"]
   45     45   
legacy-rustls-ring = ["dep:legacy-hyper-rustls", "dep:legacy-rustls", "hyper-014"]
   46     46   
rustls-ring = ["dep:rustls", "rustls?/ring", "dep:hyper-rustls", "default-client"]
   47     47   
rustls-aws-lc = ["dep:rustls", "rustls?/aws_lc_rs", "dep:hyper-rustls", "default-client"]
   48     48   
rustls-aws-lc-fips = ["dep:rustls", "rustls?/fips", "dep:hyper-rustls", "default-client"]
   49     49   
s2n-tls = ["dep:s2n-tls", "dep:s2n-tls-hyper", "default-client"]
   50     50   
   51     51   
[dependencies]
   52     52   
pin-project-lite = "0.2.14"
   53     53   
tracing = "0.1.40"
   54     54   
   55     55   
[dependencies.aws-smithy-async]
   56     56   
path = "../aws-smithy-async"
   57     57   
version = "1.2.5"
   58     58   
   59     59   
[dependencies.aws-smithy-runtime-api]
   60     60   
path = "../aws-smithy-runtime-api"
   61     61   
features = ["client"]
   62     62   
version = "1.8.0"
   63     63   
   64     64   
[dependencies.aws-smithy-types]
   65     65   
path = "../aws-smithy-types"
   66     66   
version = "1.3.1"
   67     67   
   68     68   
[dependencies.aws-smithy-protocol-test]
   69     69   
path = "../aws-smithy-protocol-test"
   70     70   
optional = true
   71         -
version = "0.63.2"
          71  +
version = "0.63.3"
   72     72   
   73     73   
[dependencies.h2]
   74     74   
version = "0.4.2"
   75     75   
default-features = false
   76     76   
   77     77   
[dependencies.tokio]
   78     78   
version = "1.40"
   79     79   
features = []
   80     80   
   81     81   
[dependencies.hyper]

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

@@ -1,1 +44,44 @@
   21     21   
version = "1.3.1"
   22     22   
   23     23   
[dependencies.aws-smithy-runtime-api]
   24     24   
path = "../aws-smithy-runtime-api"
   25     25   
features = ["client", "http-1x"]
   26     26   
version = "1.8.0"
   27     27   
   28     28   
[dependencies.aws-smithy-http-client]
   29     29   
path = "../aws-smithy-http-client"
   30     30   
features = ["test-util"]
   31         -
version = "1.0.3"
          31  +
version = "1.0.4"
   32     32   
[dev-dependencies.tokio]
   33     33   
version = "1"
   34     34   
features = ["full"]
   35     35   
   36     36   
[dev-dependencies.aws-smithy-async]
   37     37   
path = "../aws-smithy-async"
   38     38   
features = ["rt-tokio"]
   39     39   
version = "1.2.5"
   40     40   
   41     41   
[dev-dependencies.aws-smithy-runtime]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-protocol-test/Cargo.toml

@@ -1,1 +31,31 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-protocol-test"
    4         -
version = "0.63.2"
           4  +
version = "0.63.3"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
    6      6   
description = "A collection of library functions to validate HTTP requests against Smithy protocol tests."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]

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

@@ -33,33 +93,93 @@
   53     53   
version = "1.8.0"
   54     54   
   55     55   
[dependencies.aws-smithy-types]
   56     56   
path = "../aws-smithy-types"
   57     57   
features = ["http-body-0-4-x"]
   58     58   
version = "1.3.1"
   59     59   
   60     60   
[dependencies.aws-smithy-http-client]
   61     61   
path = "../aws-smithy-http-client"
   62     62   
optional = true
   63         -
version = "1.0.3"
          63  +
version = "1.0.4"
   64     64   
   65     65   
[dependencies.http-02x]
   66     66   
package = "http"
   67     67   
version = "0.2.9"
   68     68   
   69     69   
[dependencies.http-1x]
   70     70   
package = "http"
   71     71   
version = "1"
   72     72   
   73     73   
[dependencies.http-body-04x]

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

@@ -1,1 +0,25 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-xml"
    4         -
version = "0.60.9"
           4  +
version = "0.60.10"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
    6      6   
description = "XML parsing logic for Smithy protocols."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[dependencies]
   17     17   
xmlparser = "0.13.5"
   18     18   
   19     19   
[dev-dependencies]
   20     20   
base64 = "0.13.0"
   21     21   
proptest = "1"
   22     22   
   23     23   
[dev-dependencies.aws-smithy-protocol-test]
   24     24   
path = "../aws-smithy-protocol-test"
   25         -
version = "0.63.2"
          25  +
version = "0.63.3"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-xml/src/decode.rs

@@ -325,325 +385,385 @@
  345    345   
  346    346   
    fn nested_decoder<'a>(&'a mut self, start_el: StartEl<'inp>) -> ScopedDecoder<'inp, 'a> {
  347    347   
        ScopedDecoder {
  348    348   
            doc: self.doc,
  349    349   
            start_el,
  350    350   
            terminated: false,
  351    351   
        }
  352    352   
    }
  353    353   
}
  354    354   
  355         -
impl<'inp, 'a> Iterator for ScopedDecoder<'inp, 'a> {
         355  +
impl<'inp> Iterator for ScopedDecoder<'inp, '_> {
  356    356   
    type Item = Result<(XmlToken<'inp>, Depth), XmlDecodeError>;
  357    357   
  358    358   
    fn next(&mut self) -> Option<Self::Item> {
  359    359   
        if self.start_el.closed {
  360    360   
            self.terminated = true;
  361    361   
        }
  362    362   
        if self.terminated {
  363    363   
            return None;
  364    364   
        }
  365    365   
        let (tok, depth) = match self.doc.next() {

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-xml/src/encode.rs

@@ -33,33 +93,93 @@
   53     53   
pub struct XmlWriter<'a> {
   54     54   
    doc: &'a mut String,
   55     55   
}
   56     56   
   57     57   
impl<'a> XmlWriter<'a> {
   58     58   
    pub fn new(doc: &'a mut String) -> Self {
   59     59   
        Self { doc }
   60     60   
    }
   61     61   
}
   62     62   
   63         -
impl<'a> XmlWriter<'a> {
          63  +
impl XmlWriter<'_> {
   64     64   
    pub fn start_el<'b, 'c>(&'c mut self, tag: &'b str) -> ElWriter<'c, 'b> {
   65     65   
        write!(self.doc, "<{}", tag).unwrap();
   66     66   
        ElWriter::new(self.doc, tag)
   67     67   
    }
   68     68   
}
   69     69   
   70     70   
pub struct ElWriter<'a, 'b> {
   71     71   
    start: &'b str,
   72     72   
    doc: Option<&'a mut String>,
   73     73   
}

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

@@ -1,1 +40,40 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-sdk-bedrockruntime"
    4      4   
version = "0.0.0-local"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
    6      6   
description = "AWS SDK for Amazon Bedrock Runtime"
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/awslabs/aws-sdk-rust"
   10         -
rust-version = "1.82.0"
          10  +
rust-version = "1.85.0"
   11     11   
readme = "README.md"
   12     12   
[package.metadata.smithy]
   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.3"
   20     20   
@@ -47,47 +95,95 @@
   67     67   
[dependencies.http]
   68     68   
version = "0.2.9"
   69     69   
   70     70   
[dependencies.regex-lite]
   71     71   
version = "0.1.5"
   72     72   
   73     73   
[dependencies.tracing]
   74     74   
version = "0.1"
   75     75   
[dev-dependencies.aws-config]
   76     76   
path = "../aws-config"
   77         -
version = "1.6.3"
          77  +
version = "1.6.4"
   78     78   
   79     79   
[dev-dependencies.aws-credential-types]
   80     80   
path = "../aws-credential-types"
   81     81   
features = ["test-util"]
   82     82   
version = "1.2.3"
   83     83   
   84     84   
[dev-dependencies.tokio]
   85     85   
version = "1.23.1"
   86     86   
features = ["macros", "test-util", "rt-multi-thread"]
   87     87   

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

@@ -235,235 +329,330 @@
  255    255   
    /// let config = builder.build();
  256    256   
    /// # }
  257    257   
    /// # }
  258    258   
    /// ```
  259    259   
    pub fn set_http_client(&mut self, http_client: Option<crate::config::SharedHttpClient>) -> &mut Self {
  260    260   
        self.runtime_components.set_http_client(http_client);
  261    261   
        self
  262    262   
    }
  263    263   
    /// Sets the endpoint resolver to use when making requests.
  264    264   
    ///
  265         -
         265  +
    ///
  266    266   
    /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
  267    267   
    /// rules for `aws_sdk_bedrockruntime`.
  268         -
         268  +
    ///
  269    269   
    ///
  270    270   
    /// Note: setting an endpoint resolver will replace any endpoint URL that has been set.
  271    271   
    /// This method accepts an endpoint resolver [specific to this service](crate::config::endpoint::ResolveEndpoint). If you want to
  272    272   
    /// provide a shared endpoint resolver, use [`Self::set_endpoint_resolver`].
  273    273   
    ///
  274    274   
    /// # Examples
  275    275   
    /// Create a custom endpoint resolver that resolves a different endpoing per-stage, e.g. staging vs. production.
  276    276   
    /// ```no_run
  277    277   
    /// use aws_sdk_bedrockruntime::config::endpoint::{ResolveEndpoint, EndpointFuture, Params, Endpoint};
  278    278   
    /// #[derive(Debug)]
  279    279   
    /// struct StageResolver { stage: String }
  280    280   
    /// impl ResolveEndpoint for StageResolver {
  281    281   
    ///     fn resolve_endpoint(&self, params: &Params) -> EndpointFuture<'_> {
  282    282   
    ///         let stage = &self.stage;
  283    283   
    ///         EndpointFuture::ready(Ok(Endpoint::builder().url(format!("{stage}.myservice.com")).build()))
  284    284   
    ///     }
  285    285   
    /// }
  286    286   
    /// let resolver = StageResolver { stage: std::env::var("STAGE").unwrap() };
  287    287   
    /// let config = aws_sdk_bedrockruntime::Config::builder().endpoint_resolver(resolver).build();
  288    288   
    /// let client = aws_sdk_bedrockruntime::Client::from_conf(config);
  289    289   
    /// ```
  290    290   
    pub fn endpoint_resolver(mut self, endpoint_resolver: impl crate::config::endpoint::ResolveEndpoint + 'static) -> Self {
  291    291   
        self.set_endpoint_resolver(::std::option::Option::Some(endpoint_resolver.into_shared_resolver()));
  292    292   
        self
  293    293   
    }
  294    294   
  295    295   
    /// Sets the endpoint resolver to use when making requests.
  296    296   
    ///
  297         -
         297  +
    ///
  298    298   
    /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
  299    299   
    /// rules for `aws_sdk_bedrockruntime`.
         300  +
    ///
  300    301   
    pub fn set_endpoint_resolver(
  301    302   
        &mut self,
  302    303   
        endpoint_resolver: ::std::option::Option<::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver>,
  303    304   
    ) -> &mut Self {
  304    305   
        self.runtime_components.set_endpoint_resolver(endpoint_resolver);
  305    306   
        self
  306    307   
    }
  307    308   
    /// Set the retry_config for the builder
  308    309   
    ///
  309    310   
    /// # Examples
@@ -475,476 +581,582 @@
  495    496   
    ///     .identity_cache(
  496    497   
    ///         IdentityCache::lazy()
  497    498   
    ///             // change the load timeout to 10 seconds
  498    499   
    ///             .load_timeout(Duration::from_secs(10))
  499    500   
    ///             .build()
  500    501   
    ///     )
  501    502   
    ///     // ...
  502    503   
    ///     .build();
  503    504   
    /// let client = aws_sdk_bedrockruntime::Client::from_conf(config);
  504    505   
    /// ```
  505         -
         506  +
    ///
  506    507   
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
  507    508   
        self.set_identity_cache(identity_cache);
  508    509   
        self
  509    510   
    }
  510    511   
  511    512   
    /// Set the identity cache for auth.
  512    513   
    ///
  513    514   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  514    515   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  515    516   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  516    517   
    /// the next request will result in refreshing the identity.
  517    518   
    ///
  518    519   
    /// This configuration allows you to disable or change the default caching mechanism.
  519    520   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  520    521   
    /// trait and pass that implementation into this function.
  521    522   
    ///
  522    523   
    /// # Examples
  523    524   
    ///
  524    525   
    /// Disabling identity caching:
  525    526   
    /// ```no_run
  526    527   
    /// use aws_sdk_bedrockruntime::config::IdentityCache;
  527    528   
    ///
  528    529   
    /// let config = aws_sdk_bedrockruntime::Config::builder()
  529    530   
    ///     .identity_cache(IdentityCache::no_cache())
  530    531   
    ///     // ...
  531    532   
    ///     .build();
  532    533   
    /// let client = aws_sdk_bedrockruntime::Client::from_conf(config);
  533    534   
    /// ```
  534    535   
    ///
  535    536   
    /// Customizing lazy caching:
  536    537   
    /// ```no_run
  537    538   
    /// use aws_sdk_bedrockruntime::config::IdentityCache;
  538    539   
    /// use std::time::Duration;
  539    540   
    ///
  540    541   
    /// let config = aws_sdk_bedrockruntime::Config::builder()
  541    542   
    ///     .identity_cache(
  542    543   
    ///         IdentityCache::lazy()
  543    544   
    ///             // change the load timeout to 10 seconds
  544    545   
    ///             .load_timeout(Duration::from_secs(10))
  545    546   
    ///             .build()
  546    547   
    ///     )
  547    548   
    ///     // ...
  548    549   
    ///     .build();
  549    550   
    /// let client = aws_sdk_bedrockruntime::Client::from_conf(config);
  550    551   
    /// ```
  551         -
         552  +
    ///
  552    553   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  553    554   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  554    555   
        self
  555    556   
    }
  556    557   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  557    558   
    ///
  558    559   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  559    560   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  560    561   
    /// will run after those default interceptors.
  561    562   
    ///
@@ -975,976 +1070,1071 @@
  995    996   
    /// Customizing behavior major version:
  996    997   
    /// ```no_run
  997    998   
    /// use aws_sdk_bedrockruntime::config::BehaviorVersion;
  998    999   
    ///
  999   1000   
    /// let config = aws_sdk_bedrockruntime::Config::builder()
 1000   1001   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
 1001   1002   
    ///     // ...
 1002   1003   
    ///     .build();
 1003   1004   
    /// let client = aws_sdk_bedrockruntime::Client::from_conf(config);
 1004   1005   
    /// ```
 1005         -
        1006  +
    ///
 1006   1007   
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
 1007   1008   
        self.set_behavior_version(Some(behavior_version));
 1008   1009   
        self
 1009   1010   
    }
 1010   1011   
 1011   1012   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
 1012   1013   
    ///
 1013   1014   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
 1014   1015   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
 1015   1016   
    /// all operations might be the ideal behavior but could break existing applications.
 1016   1017   
    ///
 1017   1018   
    /// # Examples
 1018   1019   
    ///
 1019   1020   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
 1020   1021   
    /// ```no_run
 1021   1022   
    /// use aws_sdk_bedrockruntime::config::BehaviorVersion;
 1022   1023   
    ///
 1023   1024   
    /// let config = aws_sdk_bedrockruntime::Config::builder()
 1024   1025   
    ///     .behavior_version(BehaviorVersion::latest())
 1025   1026   
    ///     // ...
 1026   1027   
    ///     .build();
 1027   1028   
    /// let client = aws_sdk_bedrockruntime::Client::from_conf(config);
 1028   1029   
    /// ```
 1029   1030   
    ///
 1030   1031   
    /// Customizing behavior major version:
 1031   1032   
    /// ```no_run
 1032   1033   
    /// use aws_sdk_bedrockruntime::config::BehaviorVersion;
 1033   1034   
    ///
 1034   1035   
    /// let config = aws_sdk_bedrockruntime::Config::builder()
 1035   1036   
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
 1036   1037   
    ///     // ...
 1037   1038   
    ///     .build();
 1038   1039   
    /// let client = aws_sdk_bedrockruntime::Client::from_conf(config);
 1039   1040   
    /// ```
 1040         -
        1041  +
    ///
 1041   1042   
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
 1042   1043   
        self.behavior_version = behavior_version;
 1043   1044   
        self
 1044   1045   
    }
 1045   1046   
 1046   1047   
    /// Convenience method to set the latest behavior major version
 1047   1048   
    ///
 1048   1049   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
 1049   1050   
    pub fn behavior_version_latest(mut self) -> Self {
 1050   1051   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
@@ -1131,1132 +1191,1192 @@
 1151   1152   
    }
 1152   1153   
 1153   1154   
    fn runtime_components(
 1154   1155   
        &self,
 1155   1156   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1156   1157   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
 1157   1158   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
 1158   1159   
    }
 1159   1160   
}
 1160   1161   
 1161         -
/// Cross-operation shared-state singletons
        1162  +
// Cross-operation shared-state singletons
 1162   1163   
 1163   1164   
/// A plugin that enables configuration for a single operation invocation
 1164   1165   
///
 1165   1166   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1166   1167   
/// In the case of default values requested, they will be obtained from `client_config`.
 1167   1168   
#[derive(Debug)]
 1168   1169   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1169   1170   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1170   1171   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1171   1172   
}