Skip to content

Commit

Permalink
[smithy-rs] deprecate http-02x presign APIs (#3823)
Browse files Browse the repository at this point in the history
## Motivation and Context
* smithy-lang/smithy-rs#1925
* #977

## Description
Deprecate http-02x APIs from inlineable `PresignedRequest` API. These
should have been feature gated originally but they weren't. For now
we'll mark them deprecated and encourage people to move to the 1.x
equivalents.

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x ] For changes to the AWS SDK, generated SDK code, or SDK runtime
crates, I have created a changelog entry Markdown file in the
`.changelog` directory, specifying "aws-sdk-rust" in the `applies_to`
key.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
  • Loading branch information
aajtodd authored and aws-sdk-rust-ci committed Sep 17, 2024
1 parent 70ade6f commit af04392
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions sdk/polly/src/presigning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,14 @@ impl PresignedRequest {
}

/// Given a body, produce an `http::Request` from this `PresignedRequest`
#[deprecated = "Prefer the `make_http_1x_request()` instead by enabling the `http-1x` feature."]
#[allow(deprecated)]
pub fn make_http_02x_request<B>(&self, body: B) -> http::Request<B> {
self.clone().into_http_02x_request(body)
}

/// Converts this `PresignedRequest` directly into an `http` request.
#[deprecated = "Prefer the `into_http_1x_request` instead by enabling the `http-1x` feature."]
pub fn into_http_02x_request<B>(self, body: B) -> http::Request<B> {
self.http_request
.try_into_http02x()
Expand Down
3 changes: 3 additions & 0 deletions sdk/s3/src/presigning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,14 @@ impl PresignedRequest {
}

/// Given a body, produce an `http::Request` from this `PresignedRequest`
#[deprecated = "Prefer the `make_http_1x_request()` instead by enabling the `http-1x` feature."]
#[allow(deprecated)]
pub fn make_http_02x_request<B>(&self, body: B) -> http::Request<B> {
self.clone().into_http_02x_request(body)
}

/// Converts this `PresignedRequest` directly into an `http` request.
#[deprecated = "Prefer the `into_http_1x_request` instead by enabling the `http-1x` feature."]
pub fn into_http_02x_request<B>(self, body: B) -> http::Request<B> {
self.http_request
.try_into_http02x()
Expand Down
6 changes: 3 additions & 3 deletions versions.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
smithy_rs_revision = '0f9b9aba386ea3063912a0464ba6a1fd7c596018'
smithy_rs_revision = 'db1a9f19d3f6f34a80d9a2a89616d38666a82de8'
aws_doc_sdk_examples_revision = '054d2fbdcb039d077615ce17e5b66ed92e8a33d1'

[manual_interventions]
Expand Down Expand Up @@ -1709,7 +1709,7 @@ model_hash = 'fb30d8140dc6c97dce278f65e1fa28df9b2baa17c5e2dd8e69441b42c74673fb'
[crates.aws-sdk-polly]
category = 'AwsSdk'
version = '1.45.0'
source_hash = '681a658280c32cd9bac43db812db4019377b44aa195d53663bcc1c2b81956bda'
source_hash = '8d79353413f9f09221ae9a8b828cc8e6a006caf66661fdd42c8293568167cc37'
model_hash = 'f8f5e8ceafd806636aad9426ded4cc9ca78dc85a5b662bd6997e207d1ae5637c'

[crates.aws-sdk-pricing]
Expand Down Expand Up @@ -1907,7 +1907,7 @@ model_hash = '34648839402316ab9da4bef0fe11beb9bc3ec1d05b3ff7d09664ab74c0cb3d2b'
[crates.aws-sdk-s3]
category = 'AwsSdk'
version = '1.50.0'
source_hash = '6bf3f8046b204fee86adbc3344c2013f3995d5f1233a079a404088ed99a4358e'
source_hash = 'b3cccd28a6a4ed35dbfea9a2bd9f8cf50ca9c0dc4fbe5df4755208d5e405e3ca'
model_hash = 'b32f386a3667d527a28335425b841a8e51ecb2bb470e13062740e75bd3e6bf14'

[crates.aws-sdk-s3control]
Expand Down

0 comments on commit af04392

Please sign in to comment.