From 2ad87c0eed482d08e00cabbc0b188b296be166fa Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Tue, 26 Jul 2022 10:14:49 -0500 Subject: [PATCH] feature: support flexible checksums (#1561) feature: support flexible checksums update: s3 model update: CHANGELOG.next.toml --- CHANGELOG.next.toml | 57 + .../aws-http/src/content_encoding.rs | 8 +- aws/rust-runtime/aws-inlineable/Cargo.toml | 31 +- .../aws-inlineable/src/glacier_checksums.rs | 2 +- .../aws-inlineable/src/http_body_checksum.rs | 345 ++++ aws/rust-runtime/aws-inlineable/src/lib.rs | 3 + .../src/http_request/canonical_request.rs | 6 + .../aws-sigv4/src/http_request/sign.rs | 3 + .../smithy/rustsdk/AwsCodegenDecorator.kt | 2 + .../rustsdk/HttpRequestChecksumDecorator.kt | 170 ++ .../rustsdk/HttpResponseChecksumDecorator.kt | 120 ++ .../rustsdk/IntegrationTestDependencies.kt | 10 + aws/sdk/aws-models/s3.json | 1528 ++++++++++++++--- aws/sdk/integration-tests/s3/Cargo.toml | 4 + .../integration-tests/s3/tests/checksums.rs | 349 ++++ .../ServerHttpBoundProtocolGenerator.kt | 5 +- .../rust/codegen/rustlang/CargoDependency.kt | 3 +- .../customize/OperationCustomization.kt | 5 + .../generators/http/HttpBindingGenerator.kt | 2 +- .../protocol/MakeOperationGenerator.kt | 2 +- .../generators/protocol/ProtocolGenerator.kt | 12 +- .../protocols/HttpBoundProtocolGenerator.kt | 44 +- .../protocol/ProtocolTestGeneratorTest.kt | 5 +- .../src/body/calculate.rs | 8 +- .../aws-smithy-checksums/src/body/validate.rs | 17 +- rust-runtime/aws-smithy-checksums/src/http.rs | Bin 12277 -> 7995 bytes rust-runtime/aws-smithy-checksums/src/lib.rs | 102 ++ rust-runtime/aws-smithy-http/src/operation.rs | 10 + 28 files changed, 2569 insertions(+), 284 deletions(-) create mode 100644 aws/rust-runtime/aws-inlineable/src/http_body_checksum.rs create mode 100644 aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt create mode 100644 aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpResponseChecksumDecorator.kt create mode 100644 aws/sdk/integration-tests/s3/tests/checksums.rs diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index a643a6b795..3a3b3979fd 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -143,6 +143,63 @@ references = ["smithy-rs#1157"] meta = { "breaking" = true, "tada" = false, "bug" = false } author = "82marbag" +[[aws-sdk-rust]] +message = """ +The AWS SDK for Rust now supports [additional checksum algorithms for Amazon S3](https://aws.amazon.com/blogs/aws/new-additional-checksum-algorithms-for-amazon-s3/). +When getting and putting objects, you may now request that the request body be validated with a checksum. The supported +algorithms are SHA-1, SHA-256, CRC-32, and CRC-32C. + +```rust +#[tokio::main] +async fn main() -> Result<(), Box> { + let sdk_config = aws_config::load_from_env().await; + let s3_client = aws_sdk_s3::Client::new(&sdk_config); + let body = aws_sdk_s3::types::ByteStream::read_from() + .path(std::path::Path::new("./path/to/your/file.txt")) + .build() + .await + .unwrap(); + + let _ = s3_client + .put_object() + .bucket("your-bucket") + .key("file.txt") + .body(body) + // When using this field, the checksum will be calculated for you + .checksum_algorithm(aws_sdk_s3::model::ChecksumAlgorithm::Crc32C) + .send() + .await?; + + let body = aws_sdk_s3::types::ByteStream::read_from() + .path(std::path::Path::new("./path/to/your/other-file.txt")) + .build() + .await + .unwrap(); + + let _ = s3_client + .put_object() + .bucket("your-bucket") + .key("other-file.txt") + .body(body) + // Alternatively, you can pass a checksum that you've calculated yourself. It must be base64 + // encoded. Also, make sure that you're base64 encoding the bytes of the checksum, not its + // string representation. + .checksum_crc32_c(aws_smithy_types::base64::encode(&A_PRECALCULATED_CRC_32_C_CHECKSUM[..])) + .send() + .await?; +} +``` +""" +references = ["smithy-rs#1482"] +meta = { "breaking" = false, "tada" = true, "bug" = false } +author = "Velfi" + +[[smithy-rs]] +message = "Update codegen to generate support for flexible checksums." +references = ["smithy-rs#1482"] +meta = { "breaking" = false, "tada" = true, "bug" = false } +author = "Velfi" + [[aws-sdk-rust]] message = "SDK crate READMEs now include an example of creating a client" references = ["smithy-rs#1571", "smithy-rs#1385"] diff --git a/aws/rust-runtime/aws-http/src/content_encoding.rs b/aws/rust-runtime/aws-http/src/content_encoding.rs index 8bb71d6485..e25b2c8b5c 100644 --- a/aws/rust-runtime/aws-http/src/content_encoding.rs +++ b/aws/rust-runtime/aws-http/src/content_encoding.rs @@ -44,7 +44,9 @@ impl AwsChunkedBodyOptions { } fn total_trailer_length(&self) -> u64 { - self.trailer_lengths.iter().sum() + self.trailer_lengths.iter().sum::() + // We need to account for a CRLF after each trailer name/value pair + + (self.trailer_lengths.len() * CRLF.len()) as u64 } /// Set a trailer len @@ -519,10 +521,12 @@ mod tests { } #[tokio::test] - #[should_panic = "called `Result::unwrap()` on an `Err` value: ReportedTrailerLengthMismatch { actual: 42, expected: 0 }"] + #[should_panic = "called `Result::unwrap()` on an `Err` value: ReportedTrailerLengthMismatch { actual: 44, expected: 0 }"] async fn test_aws_chunked_encoding_incorrect_trailer_length_panic() { let input_str = "Hello world"; // Test body has no trailers, so this length is incorrect and will trigger an assert panic + // When the panic occurs, it will actually expect a length of 44. This is because, when using + // aws-chunked encoding, each trailer will end with a CRLF which is 2 bytes long. let wrong_trailer_len = 42; let opts = AwsChunkedBodyOptions::new(input_str.len() as u64, vec![wrong_trailer_len]); let mut body = AwsChunkedBody::new(SdkBody::from(input_str), opts); diff --git a/aws/rust-runtime/aws-inlineable/Cargo.toml b/aws/rust-runtime/aws-inlineable/Cargo.toml index 77e539e323..f169ccea7e 100644 --- a/aws/rust-runtime/aws-inlineable/Cargo.toml +++ b/aws/rust-runtime/aws-inlineable/Cargo.toml @@ -12,29 +12,32 @@ publish = false repository = "https://github.com/awslabs/smithy-rs" [dependencies] -aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http" } -aws-smithy-client = { path = "../../../rust-runtime/aws-smithy-client" } -aws-http = { path = "../aws-http" } aws-endpoint = { path = "../aws-endpoint" } -aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types" } +aws-http = { path = "../aws-http" } +aws-sig-auth = { path = "../../rust-runtime/aws-sig-auth" } +aws-smithy-checksums = { path = "../../../rust-runtime/aws-smithy-checksums" } +aws-smithy-client = { path = "../../../rust-runtime/aws-smithy-client" } +aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http" } aws-smithy-http-tower= { path = "../../../rust-runtime/aws-smithy-http-tower" } +aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types" } aws-types = { path = "../../rust-runtime/aws-types" } -aws-sig-auth = { path = "../../rust-runtime/aws-sig-auth" } +bytes = "1" +bytes-utils = "0.1.1" +hex = "0.4.3" http = "0.2.4" -tower = { version = "0.4", default-features = false } - -# Checksum dependencies: +http-body = "0.4.5" +md-5 = "0.10.1" ring = "0.16" -bytes-utils = "0.1.1" -tokio-stream = "0.1.7" -bytes = "1" tokio = { version = "1", features = ["full"] } -hex = "0.4.3" +tokio-stream = "0.1.7" +tower = { version = "0.4", default-features = false } +tracing = "0.1" [dev-dependencies] -temp-file = "0.1.6" -aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http", features = ["rt-tokio"] } aws-smithy-client = { path = "../../../rust-runtime/aws-smithy-client", features = ["test-util"] } +aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http", features = ["rt-tokio"] } +tempfile = "3.2.0" +tracing-subscriber = { version = "0.3.5", features = ["env-filter"] } [package.metadata.docs.rs] all-features = true diff --git a/aws/rust-runtime/aws-inlineable/src/glacier_checksums.rs b/aws/rust-runtime/aws-inlineable/src/glacier_checksums.rs index 3190993345..b1bf1953f6 100644 --- a/aws/rust-runtime/aws-inlineable/src/glacier_checksums.rs +++ b/aws/rust-runtime/aws-inlineable/src/glacier_checksums.rs @@ -200,7 +200,7 @@ mod test { while test_data.len() < total_size { test_data.extend_from_slice(base_seq) } - let target = temp_file::empty(); + let target = tempfile::NamedTempFile::new().unwrap(); tokio::fs::write(target.path(), test_data).await.unwrap(); let body = ByteStream::from_path(target.path()) .await diff --git a/aws/rust-runtime/aws-inlineable/src/http_body_checksum.rs b/aws/rust-runtime/aws-inlineable/src/http_body_checksum.rs new file mode 100644 index 0000000000..4848f5c89a --- /dev/null +++ b/aws/rust-runtime/aws-inlineable/src/http_body_checksum.rs @@ -0,0 +1,345 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +//! Functions for modifying requests and responses for the purposes of checksum validation + +use http::header::HeaderName; + +/// Errors related to constructing checksum-validated HTTP requests +#[derive(Debug)] +#[allow(dead_code)] +pub(crate) enum Error { + /// Only request bodies with a known size can be checksum validated + UnsizedRequestBody, + ChecksumHeadersAreUnsupportedForStreamingBody, +} + +impl std::fmt::Display for Error { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::UnsizedRequestBody => write!( + f, + "Only request bodies with a known size can be checksum validated." + ), + Self::ChecksumHeadersAreUnsupportedForStreamingBody => write!( + f, + "Checksum header insertion is only supported for non-streaming HTTP bodies. \ + To checksum validate a streaming body, the checksums must be sent as trailers." + ), + } + } +} + +impl std::error::Error for Error {} + +/// Given a `&mut http::request::Request` and a `aws_smithy_checksums::ChecksumAlgorithm`, +/// calculate a checksum and modify the request to include the checksum as a header +/// (for in-memory request bodies) or a trailer (for streaming request bodies.) Streaming bodies +/// must be sized or this will return an error. +#[allow(dead_code)] +pub(crate) fn add_checksum_calculation_to_request( + request: &mut http::request::Request, + property_bag: &mut aws_smithy_http::property_bag::PropertyBag, + checksum_algorithm: aws_smithy_checksums::ChecksumAlgorithm, +) -> Result<(), aws_smithy_http::operation::BuildError> { + match request.body().bytes() { + // Body is in-memory: read it and insert the checksum as a header. + Some(data) => { + let mut checksum = checksum_algorithm.into_impl(); + checksum.update(data); + + request + .headers_mut() + .insert(checksum.header_name(), checksum.header_value()); + } + // Body is streaming: wrap the body so it will emit a checksum as a trailer. + None => { + wrap_streaming_request_body_in_checksum_calculating_body( + request, + property_bag, + checksum_algorithm, + )?; + } + } + + Ok(()) +} + +#[allow(dead_code)] +fn wrap_streaming_request_body_in_checksum_calculating_body( + request: &mut http::request::Request, + property_bag: &mut aws_smithy_http::property_bag::PropertyBag, + checksum_algorithm: aws_smithy_checksums::ChecksumAlgorithm, +) -> Result<(), aws_smithy_http::operation::BuildError> { + use aws_http::content_encoding::{AwsChunkedBody, AwsChunkedBodyOptions}; + use aws_smithy_checksums::{body::calculate, http::HttpChecksum}; + use http_body::Body; + + let original_body_size = request.body().size_hint().exact().ok_or_else(|| { + aws_smithy_http::operation::BuildError::Other(Box::new(Error::UnsizedRequestBody)) + })?; + + // Streaming request bodies with trailers require special signing + property_bag.insert(aws_sig_auth::signer::SignableBody::StreamingUnsignedPayloadTrailer); + + let mut body = { + let body = std::mem::replace(request.body_mut(), aws_smithy_http::body::SdkBody::taken()); + + body.map(move |body| { + let checksum = checksum_algorithm.into_impl(); + let trailer_len = HttpChecksum::size(checksum.as_ref()); + let body = calculate::ChecksumBody::new(body, checksum); + let aws_chunked_body_options = + AwsChunkedBodyOptions::new(original_body_size, vec![trailer_len]); + + let body = AwsChunkedBody::new(body, aws_chunked_body_options); + + aws_smithy_http::body::SdkBody::from_dyn(aws_smithy_http::body::BoxBody::new(body)) + }) + }; + + let encoded_content_length = body.size_hint().exact().ok_or_else(|| { + aws_smithy_http::operation::BuildError::Other(Box::new(Error::UnsizedRequestBody)) + })?; + + let headers = request.headers_mut(); + + headers.insert( + http::header::HeaderName::from_static("x-amz-trailer"), + // Convert into a `HeaderName` and then into a `HeaderValue` + http::header::HeaderName::from(checksum_algorithm).into(), + ); + + headers.insert( + http::header::CONTENT_LENGTH, + http::HeaderValue::from(encoded_content_length), + ); + headers.insert( + http::header::HeaderName::from_static("x-amz-decoded-content-length"), + http::HeaderValue::from(original_body_size), + ); + headers.insert( + http::header::CONTENT_ENCODING, + http::HeaderValue::from_str(aws_http::content_encoding::header_value::AWS_CHUNKED) + .map_err(|err| aws_smithy_http::operation::BuildError::Other(Box::new(err))) + .expect("\"aws-chunked\" will always be a valid HeaderValue"), + ); + + std::mem::swap(request.body_mut(), &mut body); + + Ok(()) +} + +/// Given an `SdkBody`, a `aws_smithy_checksums::ChecksumAlgorithm`, and a pre-calculated checksum, +/// return an `SdkBody` where the body will processed with the checksum algorithm and checked +/// against the pre-calculated checksum. +#[allow(dead_code)] +pub(crate) fn wrap_body_with_checksum_validator( + body: aws_smithy_http::body::SdkBody, + checksum_algorithm: aws_smithy_checksums::ChecksumAlgorithm, + precalculated_checksum: bytes::Bytes, +) -> aws_smithy_http::body::SdkBody { + use aws_smithy_checksums::body::validate; + use aws_smithy_http::body::{BoxBody, SdkBody}; + + body.map(move |body| { + SdkBody::from_dyn(BoxBody::new(validate::ChecksumBody::new( + body, + checksum_algorithm.into_impl(), + precalculated_checksum.clone(), + ))) + }) +} + +/// Given a `HeaderMap`, extract any checksum included in the headers as `Some(Bytes)`. +/// If no checksum header is set, return `None`. If multiple checksum headers are set, the one that +/// is fastest to compute will be chosen. +#[allow(dead_code)] +pub(crate) fn check_headers_for_precalculated_checksum( + headers: &http::HeaderMap, + response_algorithms: &[&str], +) -> Option<(aws_smithy_checksums::ChecksumAlgorithm, bytes::Bytes)> { + let checksum_algorithms_to_check = + aws_smithy_checksums::http::CHECKSUM_ALGORITHMS_IN_PRIORITY_ORDER + .into_iter() + // Process list of algorithms, from fastest to slowest, that may have been used to checksum + // the response body, ignoring any that aren't marked as supported algorithms by the model. + .flat_map(|algo| { + // For loop is necessary b/c the compiler doesn't infer the correct lifetimes for iter().find() + for res_algo in response_algorithms { + if algo.eq_ignore_ascii_case(res_algo) { + return Some(algo); + } + } + + None + }); + + for checksum_algorithm in checksum_algorithms_to_check { + let checksum_algorithm: aws_smithy_checksums::ChecksumAlgorithm = checksum_algorithm.parse().expect( + "CHECKSUM_ALGORITHMS_IN_PRIORITY_ORDER only contains valid checksum algorithm names", + ); + if let Some(precalculated_checksum) = headers.get(HeaderName::from(checksum_algorithm)) { + let base64_encoded_precalculated_checksum = precalculated_checksum + .to_str() + .expect("base64 uses ASCII characters"); + + let precalculated_checksum: bytes::Bytes = + aws_smithy_types::base64::decode(base64_encoded_precalculated_checksum) + .expect("services will always base64 encode the checksum value per the spec") + .into(); + + return Some((checksum_algorithm, precalculated_checksum)); + } + } + + None +} + +#[cfg(test)] +mod tests { + use super::wrap_body_with_checksum_validator; + use aws_smithy_checksums::ChecksumAlgorithm; + use aws_smithy_http::body::SdkBody; + use aws_smithy_http::byte_stream::ByteStream; + use bytes::{Bytes, BytesMut}; + use http_body::Body; + use std::sync::Once; + use tempfile::NamedTempFile; + + static INIT_LOGGER: Once = Once::new(); + fn init_logger() { + INIT_LOGGER.call_once(|| { + tracing_subscriber::fmt::init(); + }); + } + + #[tokio::test] + async fn test_checksum_body_is_retryable() { + let input_text = "Hello world"; + let precalculated_checksum = Bytes::from_static(&[0x8b, 0xd6, 0x9e, 0x52]); + let body = SdkBody::retryable(move || SdkBody::from(input_text)); + + // ensure original SdkBody is retryable + assert!(body.try_clone().is_some()); + + let body = body.map(move |sdk_body| { + let checksum_algorithm: ChecksumAlgorithm = "crc32".parse().unwrap(); + wrap_body_with_checksum_validator( + sdk_body, + checksum_algorithm, + precalculated_checksum.clone(), + ) + }); + + // ensure wrapped SdkBody is retryable + let mut body = body.try_clone().expect("body is retryable"); + + let mut validated_body = BytesMut::new(); + + loop { + match body.data().await { + Some(Ok(data)) => validated_body.extend_from_slice(&data), + Some(Err(err)) => panic!("{}", err), + None => { + break; + } + } + } + + let body = std::str::from_utf8(&validated_body).unwrap(); + + // ensure that the wrapped body passes checksum validation + assert_eq!(input_text, body); + } + + #[tokio::test] + async fn test_checksum_body_from_file_is_retryable() { + use std::io::Write; + let mut file = NamedTempFile::new().unwrap(); + let checksum_algorithm: ChecksumAlgorithm = "crc32c".parse().unwrap(); + let mut crc32c_checksum = checksum_algorithm.into_impl(); + + for i in 0..10000 { + let line = format!("This is a large file created for testing purposes {}", i); + file.as_file_mut().write(line.as_bytes()).unwrap(); + crc32c_checksum.update(&line.as_bytes()); + } + + let body = ByteStream::read_from() + .path(&file) + .buffer_size(1024) + .build() + .await + .unwrap(); + + let precalculated_checksum = crc32c_checksum.finalize(); + let expected_checksum = precalculated_checksum.clone(); + + let body = body.map(move |sdk_body| { + wrap_body_with_checksum_validator( + sdk_body, + checksum_algorithm, + precalculated_checksum.clone(), + ) + }); + + // ensure wrapped SdkBody is retryable + let mut body = body.into_inner().try_clone().expect("body is retryable"); + + let mut validated_body = BytesMut::new(); + + // If this loop completes, then it means the body's checksum was valid, but let's calculate + // a checksum again just in case. + let mut redundant_crc32c_checksum = checksum_algorithm.into_impl(); + loop { + match body.data().await { + Some(Ok(data)) => { + redundant_crc32c_checksum.update(&data); + validated_body.extend_from_slice(&data); + } + Some(Err(err)) => panic!("{}", err), + None => { + break; + } + } + } + + let actual_checksum = redundant_crc32c_checksum.finalize(); + assert_eq!(expected_checksum, actual_checksum); + + // Ensure the file's checksum isn't the same as an empty checksum. This way, we'll know that + // data was actually processed. + let unexpected_checksum = checksum_algorithm.into_impl().finalize(); + assert_ne!(unexpected_checksum, actual_checksum); + } + + #[tokio::test] + async fn test_build_checksum_validated_body_works() { + init_logger(); + + let checksum_algorithm = "crc32".parse().unwrap(); + let input_text = "Hello world"; + let precalculated_checksum = Bytes::from_static(&[0x8b, 0xd6, 0x9e, 0x52]); + let body = ByteStream::new(SdkBody::from(input_text)); + + let body = body.map(move |sdk_body| { + wrap_body_with_checksum_validator( + sdk_body, + checksum_algorithm, + precalculated_checksum.clone(), + ) + }); + + let mut validated_body = Vec::new(); + if let Err(e) = tokio::io::copy(&mut body.into_async_read(), &mut validated_body).await { + tracing::error!("{}", e); + panic!("checksum validation has failed"); + }; + let body = std::str::from_utf8(&validated_body).unwrap(); + + assert_eq!(input_text, body); + } +} diff --git a/aws/rust-runtime/aws-inlineable/src/lib.rs b/aws/rust-runtime/aws-inlineable/src/lib.rs index 76b285f708..b4e00994d4 100644 --- a/aws/rust-runtime/aws-inlineable/src/lib.rs +++ b/aws/rust-runtime/aws-inlineable/src/lib.rs @@ -35,3 +35,6 @@ pub mod middleware; /// Strip prefixes from IDs returned by Route53 operations when those IDs are used to construct requests pub mod route53_resource_id_preprocessor; + +/// Convert a streaming `SdkBody` into an aws-chunked streaming body with checksum trailers +pub mod http_body_checksum; diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs b/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs index 9eee68f8da..eb888d0565 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs @@ -40,6 +40,7 @@ pub(crate) mod param { pub(crate) const HMAC_256: &str = "AWS4-HMAC-SHA256"; const UNSIGNED_PAYLOAD: &str = "UNSIGNED-PAYLOAD"; +const STREAMING_UNSIGNED_PAYLOAD_TRAILER: &str = "STREAMING-UNSIGNED-PAYLOAD-TRAILER"; #[derive(Debug, PartialEq)] pub(super) struct HeaderValues<'a> { @@ -243,10 +244,15 @@ impl<'a> CanonicalRequest<'a> { // - compute a hash // - use the precomputed hash // - use `UnsignedPayload` + // - use `UnsignedPayload` for streaming requests + // - use `StreamingUnsignedPayloadTrailer` for streaming requests with trailers match body { SignableBody::Bytes(data) => Cow::Owned(sha256_hex_string(data)), SignableBody::Precomputed(digest) => Cow::Borrowed(digest.as_str()), SignableBody::UnsignedPayload => Cow::Borrowed(UNSIGNED_PAYLOAD), + SignableBody::StreamingUnsignedPayloadTrailer => { + Cow::Borrowed(STREAMING_UNSIGNED_PAYLOAD_TRAILER) + } } } diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs index b437c3c4b7..ea22d18a77 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs @@ -101,6 +101,9 @@ pub enum SignableBody<'a> { /// lowercase hex encoded. Eg: /// `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` Precomputed(String), + + /// Set when a streaming body has checksum trailers. + StreamingUnsignedPayloadTrailer, } #[derive(Debug)] diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCodegenDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCodegenDecorator.kt index db7b38373a..0ad1990c85 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCodegenDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsCodegenDecorator.kt @@ -26,6 +26,8 @@ val DECORATORS = listOf( AwsEndpointDecorator(), UserAgentDecorator(), SigV4SigningDecorator(), + HttpRequestChecksumDecorator(), + HttpResponseChecksumDecorator(), RetryPolicyDecorator(), IntegrationTestDecorator(), AwsFluentClientDecorator(), diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt new file mode 100644 index 0000000000..510fe12b2a --- /dev/null +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt @@ -0,0 +1,170 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rustsdk + +import software.amazon.smithy.aws.traits.HttpChecksumTrait +import software.amazon.smithy.model.shapes.OperationShape +import software.amazon.smithy.rust.codegen.rustlang.CargoDependency +import software.amazon.smithy.rust.codegen.rustlang.Visibility +import software.amazon.smithy.rust.codegen.rustlang.Writable +import software.amazon.smithy.rust.codegen.rustlang.asType +import software.amazon.smithy.rust.codegen.rustlang.rust +import software.amazon.smithy.rust.codegen.rustlang.rustTemplate +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.RuntimeConfig +import software.amazon.smithy.rust.codegen.smithy.RuntimeType +import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization +import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection +import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator +import software.amazon.smithy.rust.codegen.smithy.generators.operationBuildError +import software.amazon.smithy.rust.codegen.util.expectMember +import software.amazon.smithy.rust.codegen.util.getTrait +import software.amazon.smithy.rust.codegen.util.inputShape +import software.amazon.smithy.rust.codegen.util.orNull + +fun RuntimeConfig.awsInlineableBodyWithChecksum() = RuntimeType.forInlineDependency( + InlineAwsDependency.forRustFile( + "http_body_checksum", visibility = Visibility.PUBLIC, + CargoDependency.Http, + CargoDependency.HttpBody, + CargoDependency.SmithyHttp(this), + CargoDependency.SmithyChecksums(this), + CargoDependency.SmithyTypes(this), + CargoDependency.Bytes, + CargoDependency.Tracing, + this.sigAuth(), + this.awsHttp(), + ) +) + +class HttpRequestChecksumDecorator : RustCodegenDecorator { + override val name: String = "HttpRequestChecksum" + override val order: Byte = 0 + + override fun operationCustomizations( + codegenContext: ClientCodegenContext, + operation: OperationShape, + baseCustomizations: List + ): List { + return baseCustomizations + HttpRequestChecksumCustomization(codegenContext, operation) + } +} + +private fun HttpChecksumTrait.requestAlgorithmMember( + codegenContext: ClientCodegenContext, + operationShape: OperationShape +): String? { + val requestAlgorithmMember = this.requestAlgorithmMember.orNull() ?: return null + val checksumAlgorithmMemberShape = + operationShape.inputShape(codegenContext.model).expectMember(requestAlgorithmMember) + + return codegenContext.symbolProvider.toMemberName(checksumAlgorithmMemberShape) +} + +private fun HttpChecksumTrait.checksumAlgorithmToStr( + codegenContext: ClientCodegenContext, + operationShape: OperationShape +): Writable { + val runtimeConfig = codegenContext.runtimeConfig + val requestAlgorithmMember = this.requestAlgorithmMember(codegenContext, operationShape) + val isRequestChecksumRequired = this.isRequestChecksumRequired + + return { + if (requestAlgorithmMember != null) { + // User may set checksum for requests, and we need to call as_ref before we can convert the algorithm to a &str + rust("let checksum_algorithm = $requestAlgorithmMember.as_ref();") + + if (isRequestChecksumRequired) { + // Checksums are required, fall back to MD5 + rust("""let checksum_algorithm = checksum_algorithm.map(|algorithm| algorithm.as_str()).or(Some("md5"));""") + } else { + // Checksums aren't required, don't set a fallback + rust("let checksum_algorithm = checksum_algorithm.map(|algorithm| algorithm.as_str());") + } + } else if (isRequestChecksumRequired) { + // Checksums are required but a user can't set one, so we set MD5 for them + rust("""let checksum_algorithm = Some("md5");""") + } + + rustTemplate( + """ + let checksum_algorithm = match checksum_algorithm { + Some(algo) => Some( + algo.parse::<#{ChecksumAlgorithm}>() + .map_err(|err| #{BuildError}::Other(Box::new(err)))? + ), + None => None, + }; + """, + "BuildError" to runtimeConfig.operationBuildError(), + "ChecksumAlgorithm" to CargoDependency.SmithyChecksums(runtimeConfig).asType().member("ChecksumAlgorithm"), + ) + + // If a request checksum is not required and there's no way to set one, do nothing + // This happens when an operation only supports response checksums + } +} + +// This generator was implemented based on this spec: +// https://awslabs.github.io/smithy/1.0/spec/aws/aws-core.html#http-request-checksums +class HttpRequestChecksumCustomization( + private val codegenContext: ClientCodegenContext, + private val operationShape: OperationShape +) : OperationCustomization() { + private val runtimeConfig = codegenContext.runtimeConfig + + override fun section(section: OperationSection): Writable { + // Get the `HttpChecksumTrait`, returning early if this `OperationShape` doesn't have one + val checksumTrait = operationShape.getTrait() ?: return emptySection + val checksumAlgorithm = checksumTrait.requestAlgorithmMember(codegenContext, operationShape) + + return when (section) { + is OperationSection.MutateInput -> { + // Various other things will consume the input struct before we can get at the checksum algorithm + // field within it. This ensures that we preserve a copy of it. It's an enum so cloning is cheap. + if (checksumAlgorithm != null) { + + return { + rust("let $checksumAlgorithm = self.$checksumAlgorithm().cloned();") + } + } else { + emptySection + } + } + is OperationSection.MutateRequest -> { + // Return early if no request checksum can be set nor is it required + if (!checksumTrait.isRequestChecksumRequired && checksumAlgorithm == null) { + return emptySection + } else { + // `add_checksum_calculation_to_request` handles both streaming and in-memory request bodies. + return { + rustTemplate( + """ + ${section.request} = ${section.request}.augment(|mut req, properties| { + #{checksum_algorithm_to_str:W} + if let Some(checksum_algorithm) = checksum_algorithm { + #{add_checksum_calculation_to_request}(&mut req, properties, checksum_algorithm)?; + } + Result::<_, #{BuildError}>::Ok(req) + })?; + """, + "checksum_algorithm_to_str" to checksumTrait.checksumAlgorithmToStr( + codegenContext, + operationShape + ), + "add_checksum_calculation_to_request" to runtimeConfig.awsInlineableBodyWithChecksum() + .member("add_checksum_calculation_to_request"), + "BuildError" to runtimeConfig.operationBuildError(), + ) + } + } + } + else -> { + return emptySection + } + } + } +} diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpResponseChecksumDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpResponseChecksumDecorator.kt new file mode 100644 index 0000000000..eef7d07fdf --- /dev/null +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpResponseChecksumDecorator.kt @@ -0,0 +1,120 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.rustsdk + +import software.amazon.smithy.aws.traits.HttpChecksumTrait +import software.amazon.smithy.model.shapes.MemberShape +import software.amazon.smithy.model.shapes.OperationShape +import software.amazon.smithy.rust.codegen.rustlang.Writable +import software.amazon.smithy.rust.codegen.rustlang.rustTemplate +import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext +import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization +import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection +import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator +import software.amazon.smithy.rust.codegen.util.expectMember +import software.amazon.smithy.rust.codegen.util.getTrait +import software.amazon.smithy.rust.codegen.util.inputShape +import software.amazon.smithy.rust.codegen.util.orNull + +private fun HttpChecksumTrait.requestValidationModeMember( + codegenContext: ClientCodegenContext, + operationShape: OperationShape +): MemberShape? { + val requestValidationModeMember = this.requestValidationModeMember.orNull() ?: return null + return operationShape.inputShape(codegenContext.model).expectMember(requestValidationModeMember) +} + +class HttpResponseChecksumDecorator : RustCodegenDecorator { + override val name: String = "HttpResponseChecksum" + override val order: Byte = 0 + + override fun operationCustomizations( + codegenContext: ClientCodegenContext, + operation: OperationShape, + baseCustomizations: List + ): List { + return baseCustomizations + HttpResponseChecksumCustomization(codegenContext, operation) + } +} + +// This generator was implemented based on this spec: +// https://awslabs.github.io/smithy/1.0/spec/aws/aws-core.html#http-request-checksums +class HttpResponseChecksumCustomization( + private val codegenContext: ClientCodegenContext, + private val operationShape: OperationShape +) : OperationCustomization() { + override fun section(section: OperationSection): Writable { + val checksumTrait = operationShape.getTrait() ?: return emptySection + val requestValidationModeMember = + checksumTrait.requestValidationModeMember(codegenContext, operationShape) ?: return emptySection + val requestValidationModeMemberInner = if (requestValidationModeMember.isOptional) { + codegenContext.model.expectShape(requestValidationModeMember.target) + } else { + requestValidationModeMember + } + val validationModeName = codegenContext.symbolProvider.toMemberName(requestValidationModeMember) + + when (section) { + is OperationSection.MutateRequest -> { + // Otherwise, we need to set a property that the `MutateOutput` section handler will read to know if it + // should checksum validate the response. + return { + rustTemplate( + """ + if let Some($validationModeName) = self.$validationModeName.as_ref() { + let $validationModeName = $validationModeName.clone(); + // Place #{ValidationModeShape} in the property bag so we can check + // it during response deserialization to see if we need to checksum validate + // the response body. + let _ = request.properties_mut().insert($validationModeName); + } + """, + "ValidationModeShape" to codegenContext.symbolProvider.toSymbol(requestValidationModeMemberInner), + ) + } + } + is OperationSection.MutateOutput -> { + // CRC32, CRC32C, SHA256, SHA1 -> "crc32", "crc32c", "sha256", "sha1" + val responseAlgorithms = checksumTrait.responseAlgorithms + .map { algorithm -> algorithm.lowercase() }.joinToString(", ") { algorithm -> "\"$algorithm\"" } + + return { + rustTemplate( + """ + let response_algorithms = [$responseAlgorithms].as_slice(); + let $validationModeName = properties.get::<#{ValidationModeShape}>(); + // Per [the spec](https://awslabs.github.io/smithy/1.0/spec/aws/aws-core.html##http-response-checksums), + // we check to see if it's the `ENABLED` variant + if matches!($validationModeName, Some(&#{ValidationModeShape}::Enabled)) { + if let Some((checksum_algorithm, precalculated_checksum)) = + #{check_headers_for_precalculated_checksum}( + response.headers(), + response_algorithms, + ) + { + let bytestream = output.body.take().map(|bytestream| { + bytestream.map(move |sdk_body| { + #{wrap_body_with_checksum_validator}( + sdk_body, + checksum_algorithm, + precalculated_checksum.clone(), + ) + }) + }); + output = output.set_body(bytestream); + } + } + """, + "ValidationModeShape" to codegenContext.symbolProvider.toSymbol(requestValidationModeMemberInner), + "wrap_body_with_checksum_validator" to codegenContext.runtimeConfig.awsInlineableBodyWithChecksum().member("wrap_body_with_checksum_validator"), + "check_headers_for_precalculated_checksum" to codegenContext.runtimeConfig.awsInlineableBodyWithChecksum().member("check_headers_for_precalculated_checksum"), + ) + } + } + else -> return emptySection + } + } +} diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt index c4d1a5f11b..abc90e3f58 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt @@ -6,6 +6,8 @@ package software.amazon.smithy.rustsdk import software.amazon.smithy.rust.codegen.rustlang.CargoDependency +import software.amazon.smithy.rust.codegen.rustlang.CargoDependency.Companion.BytesUtils +import software.amazon.smithy.rust.codegen.rustlang.CargoDependency.Companion.TempFile import software.amazon.smithy.rust.codegen.rustlang.CratesIo import software.amazon.smithy.rust.codegen.rustlang.DependencyScope import software.amazon.smithy.rust.codegen.rustlang.Writable @@ -80,6 +82,7 @@ class IntegrationTestDependencies( private fun serviceSpecificCustomizations(): List = when (moduleName) { "transcribestreaming" -> listOf(TranscribeTestDependencies()) + "s3" -> listOf(S3TestDependencies()) else -> emptyList() } } @@ -92,6 +95,13 @@ class TranscribeTestDependencies : LibRsCustomization() { } } +class S3TestDependencies : LibRsCustomization() { + override fun section(section: LibRsSection): Writable = writable { + addDependency(BytesUtils) + addDependency(TempFile) + } +} + private val AsyncStream = CargoDependency("async-stream", CratesIo("0.3"), DependencyScope.Dev) private val Criterion = CargoDependency("criterion", CratesIo("0.3"), scope = DependencyScope.Dev) private val FuturesCore = CargoDependency("futures-core", CratesIo("0.3"), DependencyScope.Dev) diff --git a/aws/sdk/aws-models/s3.json b/aws/sdk/aws-models/s3.json index 5c306b3a61..2bc4430933 100644 --- a/aws/sdk/aws-models/s3.json +++ b/aws/sdk/aws-models/s3.json @@ -85,7 +85,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name to which the upload was taking place.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name to which the upload was taking place.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -115,7 +115,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -369,6 +369,9 @@ { "target": "com.amazonaws.s3#GetObjectAcl" }, + { + "target": "com.amazonaws.s3#GetObjectAttributes" + }, { "target": "com.amazonaws.s3#GetObjectLegalHold" }, @@ -1043,7 +1046,7 @@ "QuoteEscapeCharacter": { "target": "com.amazonaws.s3#QuoteEscapeCharacter", "traits": { - "smithy.api#documentation": "

A single character used for escaping the quotation mark character inside an already\n escaped value. For example, the value \"\"\" a , b \"\"\" is parsed as \" a , b \".

" + "smithy.api#documentation": "

A single character used for escaping the quotation mark character inside an already\n escaped value. For example, the value \"\"\" a , b \"\"\" is parsed as \" a , b\n \".

" } }, "RecordDelimiter": { @@ -1116,6 +1119,90 @@ "com.amazonaws.s3#CacheControl": { "type": "string" }, + "com.amazonaws.s3#Checksum": { + "type": "structure", + "members": { + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains all the possible checksum or digest values for an object.

" + } + }, + "com.amazonaws.s3#ChecksumAlgorithm": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CRC32", + "name": "CRC32" + }, + { + "value": "CRC32C", + "name": "CRC32C" + }, + { + "value": "SHA1", + "name": "SHA1" + }, + { + "value": "SHA256", + "name": "SHA256" + } + ] + } + }, + "com.amazonaws.s3#ChecksumAlgorithmList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ChecksumAlgorithm" + } + }, + "com.amazonaws.s3#ChecksumCRC32": { + "type": "string" + }, + "com.amazonaws.s3#ChecksumCRC32C": { + "type": "string" + }, + "com.amazonaws.s3#ChecksumMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + } + ] + } + }, + "com.amazonaws.s3#ChecksumSHA1": { + "type": "string" + }, + "com.amazonaws.s3#ChecksumSHA256": { + "type": "string" + }, "com.amazonaws.s3#Code": { "type": "string" }, @@ -1171,7 +1258,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The name of the bucket that contains the newly created object. Does not return the access point ARN or access point alias if used.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

" + "smithy.api#documentation": "

The name of the bucket that contains the newly created object. Does not return the access point ARN or access point alias if used.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

" } }, "Key": { @@ -1183,14 +1270,38 @@ "Expiration": { "target": "com.amazonaws.s3#Expiration", "traits": { - "smithy.api#documentation": "

If the object expiration is configured, this will contain the expiration date\n (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.

", + "smithy.api#documentation": "

If the object expiration is configured, this will contain the expiration date\n (expiry-date) and rule ID (rule-id). The value of\n rule-id is URL-encoded.

", "smithy.api#httpHeader": "x-amz-expiration" } }, "ETag": { "target": "com.amazonaws.s3#ETag", "traits": { - "smithy.api#documentation": "

Entity tag that identifies the newly created object's data. Objects with different\n object data will have different entity tags. The entity tag is an opaque string. The entity\n tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5\n digest of the object data, it will contain one or more nonhexadecimal characters and/or\n will consist of less than 32 or more than 32 hexadecimal digits.

" + "smithy.api#documentation": "

Entity tag that identifies the newly created object's data. Objects with different\n object data will have different entity tags. The entity tag is an opaque string. The entity\n tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5\n digest of the object data, it will contain one or more nonhexadecimal characters and/or\n will consist of less than 32 or more than 32 hexadecimal digits. For more information about\n how the entity tag is calculated, see\n Checking\n object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" } }, "ServerSideEncryption": { @@ -1238,7 +1349,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

Name of the bucket to which the multipart upload was initiated.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

Name of the bucket to which the multipart upload was initiated.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1267,6 +1378,34 @@ "smithy.api#required": {} } }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 32-bit CRC32C checksum of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32c" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha1" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha256" + } + }, "RequestPayer": { "target": "com.amazonaws.s3#RequestPayer", "traits": { @@ -1276,9 +1415,30 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created \n using a checksum algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSECustomerKey": { + "target": "com.amazonaws.s3#SSECustomerKey", + "traits": { + "smithy.api#documentation": "

The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. \n For more information, see\n Protecting data using SSE-C keys in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum \n algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } } } }, @@ -1307,6 +1467,30 @@ "smithy.api#documentation": "

Entity tag returned when the part was uploaded.

" } }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, "PartNumber": { "target": "com.amazonaws.s3#PartNumber", "traits": { @@ -1408,7 +1592,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a copy of an object that is already stored in Amazon S3.

\n \n

You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your\n object up to 5 GB in size in a single atomic action using this API. However, to copy\n an object greater than 5 GB, you must use the multipart upload Upload Part - Copy API.\n For more information, see Copy Object Using the REST Multipart Upload API.

\n
\n

All copy requests must be authenticated. Additionally, you must have\n read access to the source object and write\n access to the destination bucket. For more information, see REST Authentication. Both the Region\n that you want to copy the object from and the Region that you want to copy the object to\n must be enabled for your account.

\n

A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3\n is copying the files. If the error occurs before the copy action starts, you receive a\n standard Amazon S3 error. If the error occurs during the copy operation, the error response is\n embedded in the 200 OK response. This means that a 200 OK\n response can contain either a success or an error. Design your application to parse the\n contents of the response and handle it appropriately.

\n

If the copy is successful, you receive a response with information about the copied\n object.

\n \n

If the request is an HTTP 1.1 request, the response is chunk encoded. If it were not,\n it would not contain the content-length, and you would need to read the entire\n body.

\n
\n

The copy request charge is based on the storage class and Region that you specify for\n the destination object. For pricing information, see Amazon S3 pricing.

\n \n

Amazon S3 transfer acceleration does not support cross-Region copies. If you request a\n cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad\n Request error. For more information, see Transfer Acceleration.

\n
\n

\n Metadata\n

\n

When copying an object, you can preserve all metadata (default) or specify new metadata.\n However, the ACL is not preserved and is set to private for the user making the request. To\n override the default ACL setting, specify a new ACL when generating a copy request. For\n more information, see Using ACLs.

\n

To specify whether you want the object metadata copied from the source object or\n replaced with metadata provided in the request, you can optionally add the\n x-amz-metadata-directive header. When you grant permissions, you can use\n the s3:x-amz-metadata-directive condition key to enforce certain metadata\n behavior when objects are uploaded. For more information, see Specifying Conditions in a\n Policy in the Amazon S3 User Guide. For a complete list of\n Amazon S3-specific condition keys, see Actions, Resources, and Condition Keys for\n Amazon S3.

\n

\n \n x-amz-copy-source-if Headers\n

\n

To only copy an object under certain conditions, such as whether the Etag\n matches or whether the object was modified before or after a specified date, use the\n following request parameters:

\n
    \n
  • \n

    \n x-amz-copy-source-if-match\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-none-match\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-unmodified-since\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-modified-since\n

    \n
  • \n
\n

If both the x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the request\n and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

\n
    \n
  • \n

    \n x-amz-copy-source-if-match condition evaluates to true

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-unmodified-since condition evaluates to\n false

    \n
  • \n
\n\n

If both the x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the request and\n evaluate as follows, Amazon S3 returns the 412 Precondition Failed response\n code:

\n
    \n
  • \n

    \n x-amz-copy-source-if-none-match condition evaluates to false

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-modified-since condition evaluates to\n true

    \n
  • \n
\n\n \n

All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed.

\n
\n

\n Server-side encryption\n

\n

When you perform a CopyObject operation, you can optionally use the appropriate encryption-related \n headers to encrypt the object using server-side encryption with Amazon Web Services managed encryption keys \n (SSE-S3 or SSE-KMS) or a customer-provided encryption key. With server-side encryption, Amazon S3 \n encrypts your data as it writes it to disks in its data centers and decrypts the data when \n you access it. For more information about server-side encryption, see Using\n Server-Side Encryption.

\n

If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object. For more\n information, see Amazon S3 Bucket Keys in the Amazon S3 User Guide.

\n

\n Access Control List (ACL)-Specific Request\n Headers\n

\n

When copying an object, you can optionally use headers to grant ACL-based permissions.\n By default, all objects are private. Only the owner has full access control. When adding a\n new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups\n defined by Amazon S3. These permissions are then added to the ACL on the object. For more\n information, see Access Control List (ACL) Overview and Managing ACLs Using the REST\n API.

\n

If the bucket that you're copying objects to uses the bucket owner enforced setting for\n S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that\n use this setting only accept PUT requests that don't specify an ACL or PUT requests that\n specify bucket owner full control ACLs, such as the bucket-owner-full-control canned\n ACL or an equivalent form of this ACL expressed in the XML format.

\n

For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.

\n \n

If your bucket uses the bucket owner enforced setting for Object Ownership, \n all objects written to the bucket by any account will be owned by the bucket owner.

\n
\n

\n Storage Class Options\n

\n

You can use the CopyObject action to change the storage class of an\n object that is already stored in Amazon S3 using the StorageClass parameter. For\n more information, see Storage\n Classes in the Amazon S3 User Guide.

\n

\n Versioning\n

\n

By default, x-amz-copy-source identifies the current version of an object\n to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was\n deleted. To copy a different version, use the versionId subresource.

\n

If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for\n the object being copied. This version ID is different from the version ID of the source\n object. Amazon S3 returns the version ID of the copied object in the\n x-amz-version-id response header in the response.

\n

If you do not enable versioning or suspend it on the target bucket, the version ID that\n Amazon S3 generates is always null.

\n

If the source object's storage class is GLACIER, you must restore a copy of this object\n before you can use it as a source object for the copy operation. For more information, see\n RestoreObject.

\n

The following operations are related to CopyObject:

\n \n

For more information, see Copying\n Objects.

", + "smithy.api#documentation": "

Creates a copy of an object that is already stored in Amazon S3.

\n \n

You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your\n object up to 5 GB in size in a single atomic action using this API. However, to copy an\n object greater than 5 GB, you must use the multipart upload Upload Part - Copy\n (UploadPartCopy) API. For more information, see Copy Object Using the\n REST Multipart Upload API.

\n
\n

All copy requests must be authenticated. Additionally, you must have\n read access to the source object and write\n access to the destination bucket. For more information, see REST Authentication. Both the Region\n that you want to copy the object from and the Region that you want to copy the object to\n must be enabled for your account.

\n

A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3\n is copying the files. If the error occurs before the copy action starts, you receive a\n standard Amazon S3 error. If the error occurs during the copy operation, the error response is\n embedded in the 200 OK response. This means that a 200 OK\n response can contain either a success or an error. Design your application to parse the\n contents of the response and handle it appropriately.

\n

If the copy is successful, you receive a response with information about the copied\n object.

\n \n

If the request is an HTTP 1.1 request, the response is chunk encoded. If it were not,\n it would not contain the content-length, and you would need to read the entire\n body.

\n
\n

The copy request charge is based on the storage class and Region that you specify for\n the destination object. For pricing information, see Amazon S3 pricing.

\n \n

Amazon S3 transfer acceleration does not support cross-Region copies. If you request a\n cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad\n Request error. For more information, see Transfer Acceleration.

\n
\n

\n Metadata\n

\n

When copying an object, you can preserve all metadata (default) or specify new metadata.\n However, the ACL is not preserved and is set to private for the user making the request. To\n override the default ACL setting, specify a new ACL when generating a copy request. For\n more information, see Using ACLs.

\n

To specify whether you want the object metadata copied from the source object or\n replaced with metadata provided in the request, you can optionally add the\n x-amz-metadata-directive header. When you grant permissions, you can use\n the s3:x-amz-metadata-directive condition key to enforce certain metadata\n behavior when objects are uploaded. For more information, see Specifying Conditions in a\n Policy in the Amazon S3 User Guide. For a complete list of\n Amazon S3-specific condition keys, see Actions, Resources, and Condition Keys for\n Amazon S3.

\n

\n x-amz-copy-source-if Headers\n

\n

To only copy an object under certain conditions, such as whether the Etag\n matches or whether the object was modified before or after a specified date, use the\n following request parameters:

\n
    \n
  • \n

    \n x-amz-copy-source-if-match\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-none-match\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-unmodified-since\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-modified-since\n

    \n
  • \n
\n

If both the x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the request\n and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

\n
    \n
  • \n

    \n x-amz-copy-source-if-match condition evaluates to true

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-unmodified-since condition evaluates to\n false

    \n
  • \n
\n\n

If both the x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the request and\n evaluate as follows, Amazon S3 returns the 412 Precondition Failed response\n code:

\n
    \n
  • \n

    \n x-amz-copy-source-if-none-match condition evaluates to false

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-modified-since condition evaluates to\n true

    \n
  • \n
\n\n \n

All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed.

\n
\n

\n Server-side encryption\n

\n

When you perform a CopyObject operation, you can optionally use the appropriate encryption-related \n headers to encrypt the object using server-side encryption with Amazon Web Services managed encryption keys \n (SSE-S3 or SSE-KMS) or a customer-provided encryption key. With server-side encryption, Amazon S3 \n encrypts your data as it writes it to disks in its data centers and decrypts the data when \n you access it. For more information about server-side encryption, see Using\n Server-Side Encryption.

\n

If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object. For more\n information, see Amazon S3 Bucket Keys in the Amazon S3 User Guide.

\n

\n Access Control List (ACL)-Specific Request\n Headers\n

\n

When copying an object, you can optionally use headers to grant ACL-based permissions.\n By default, all objects are private. Only the owner has full access control. When adding a\n new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups\n defined by Amazon S3. These permissions are then added to the ACL on the object. For more\n information, see Access Control List (ACL) Overview and Managing ACLs Using the REST\n API.

\n

If the bucket that you're copying objects to uses the bucket owner enforced setting for\n S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that\n use this setting only accept PUT requests that don't specify an ACL or PUT requests that\n specify bucket owner full control ACLs, such as the bucket-owner-full-control canned\n ACL or an equivalent form of this ACL expressed in the XML format.

\n

For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.

\n \n

If your bucket uses the bucket owner enforced setting for Object Ownership, \n all objects written to the bucket by any account will be owned by the bucket owner.

\n
\n

\n Checksums\n

\n

When copying an object, if it has a checksum, that checksum will be copied to the new object\n by default. When you copy the object over, you may optionally specify a different checksum\n algorithm to use with the x-amz-checksum-algorithm header.

\n

\n Storage Class Options\n

\n

You can use the CopyObject action to change the storage class of an\n object that is already stored in Amazon S3 using the StorageClass parameter. For\n more information, see Storage\n Classes in the Amazon S3 User Guide.

\n

\n Versioning\n

\n

By default, x-amz-copy-source identifies the current version of an object\n to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was\n deleted. To copy a different version, use the versionId subresource.

\n

If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for\n the object being copied. This version ID is different from the version ID of the source\n object. Amazon S3 returns the version ID of the copied object in the\n x-amz-version-id response header in the response.

\n

If you do not enable versioning or suspend it on the target bucket, the version ID that\n Amazon S3 generates is always null.

\n

If the source object's storage class is GLACIER, you must restore a copy of this object\n before you can use it as a source object for the copy operation. For more information, see\n RestoreObject.

\n

The following operations are related to CopyObject:

\n \n

For more information, see Copying\n Objects.

", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}/{Key+}?x-id=CopyObject", @@ -1510,7 +1694,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The name of the destination bucket.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The name of the destination bucket.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1522,6 +1706,13 @@ "smithy.api#httpHeader": "Cache-Control" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm you want Amazon S3 to use to create the checksum for the object. For more information, see\n Checking object integrity in\n the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-algorithm" + } + }, "ContentDisposition": { "target": "com.amazonaws.s3#ContentDisposition", "traits": { @@ -1553,7 +1744,7 @@ "CopySource": { "target": "com.amazonaws.s3#CopySource", "traits": { - "smithy.api#documentation": "

Specifies the source object for the copy operation. You specify the value in one of two\n formats, depending on whether you want to access the source object through an access point:

\n
    \n
  • \n

    For objects not accessed through an access point, specify the name of the source\n bucket and the key of the source object, separated by a slash (/). For example, to\n copy the object reports/january.pdf from the bucket\n awsexamplebucket, use\n awsexamplebucket/reports/january.pdf. The value must be URL\n encoded.

    \n
  • \n
  • \n

    For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:::accesspoint//object/. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

    \n \n

    Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same Amazon Web Services Region.

    \n
    \n

    Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:::outpost//object/. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL encoded.

    \n
  • \n
\n

To copy a specific version of an object, append ?versionId=\n to the value (for example,\n awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).\n If you don't specify a version ID, Amazon S3 copies the latest version of the source\n object.

", + "smithy.api#documentation": "

Specifies the source object for the copy operation. You specify the value in one of two\n formats, depending on whether you want to access the source object through an access point:

\n
    \n
  • \n

    For objects not accessed through an access point, specify the name of the source bucket\n and the key of the source object, separated by a slash (/). For example, to copy the\n object reports/january.pdf from the bucket\n awsexamplebucket, use awsexamplebucket/reports/january.pdf.\n The value must be URL-encoded.

    \n
  • \n
  • \n

    For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:::accesspoint//object/. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

    \n \n

    Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same Amazon Web Services Region.

    \n
    \n

    Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:::outpost//object/. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

    \n
  • \n
\n

To copy a specific version of an object, append ?versionId=\n to the value (for example,\n awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).\n If you don't specify a version ID, Amazon S3 copies the latest version of the source\n object.

", "smithy.api#httpHeader": "x-amz-copy-source", "smithy.api#required": {} } @@ -1764,21 +1955,21 @@ "ObjectLockLegalHoldStatus": { "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", "traits": { - "smithy.api#documentation": "

Specifies whether you want to apply a Legal Hold to the copied object.

", + "smithy.api#documentation": "

Specifies whether you want to apply a legal hold to the copied object.

", "smithy.api#httpHeader": "x-amz-object-lock-legal-hold" } }, "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected destination bucket owner. If the destination bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } }, "ExpectedSourceBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected source bucket owner. If the source bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-source-expected-bucket-owner" } } @@ -1798,6 +1989,30 @@ "traits": { "smithy.api#documentation": "

Creation date of the object.

" } + }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } } }, "traits": { @@ -1818,6 +2033,30 @@ "traits": { "smithy.api#documentation": "

Date and time at which the object was uploaded.

" } + }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } } }, "traits": { @@ -1905,7 +2144,7 @@ "Location": { "target": "com.amazonaws.s3#Location", "traits": { - "smithy.api#documentation": "

Specifies the Region where the bucket will be created. If you are creating a bucket on\n the US East (N. Virginia) Region (us-east-1), you do not need to specify the\n location.

", + "smithy.api#documentation": "

A forward slash followed by the name of the bucket.

", "smithy.api#httpHeader": "Location" } } @@ -1996,7 +2235,7 @@ "target": "com.amazonaws.s3#CreateMultipartUploadOutput" }, "traits": { - "smithy.api#documentation": "

This action initiates a multipart upload and returns an upload ID. This upload ID is\n used to associate all of the parts in the specific multipart upload. You specify this\n upload ID in each of your subsequent upload part requests (see UploadPart). You also include this\n upload ID in the final request to either complete or abort the multipart upload\n request.

\n\n

For more information about multipart uploads, see Multipart Upload Overview.

\n\n

If you have configured a lifecycle rule to abort incomplete multipart uploads, the\n upload must complete within the number of days specified in the bucket lifecycle\n configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort\n action and Amazon S3 aborts the multipart upload. For more information, see Aborting\n Incomplete Multipart Uploads Using a Bucket Lifecycle Policy.

\n\n

For information about the permissions required to use the multipart upload API, see\n Multipart Upload and\n Permissions.

\n\n

For request signing, multipart upload is just a series of regular requests. You initiate\n a multipart upload, send one or more requests to upload parts, and then complete the\n multipart upload process. You sign each request individually. There is nothing special\n about signing multipart upload requests. For more information about signing, see Authenticating\n Requests (Amazon Web Services Signature Version 4).

\n\n \n

After you initiate a multipart upload and upload one or more parts, to stop being\n charged for storing the uploaded parts, you must either complete or abort the multipart\n upload. Amazon S3 frees up the space used to store the parts and stop charging you for\n storing them only after you either complete or abort a multipart upload.

\n
\n\n

You can optionally request server-side encryption. For server-side encryption, Amazon S3\n encrypts your data as it writes it to disks in its data centers and decrypts it when you\n access it. You can provide your own encryption key, or use Amazon Web Services KMS keys or Amazon S3-managed encryption keys. If you choose to provide\n your own encryption key, the request headers you provide in UploadPart and UploadPartCopy requests must match the headers you used in the request to\n initiate the upload by using CreateMultipartUpload.

\n

To perform a multipart upload with encryption using an Amazon Web Services KMS key, the requester must\n have permission to the kms:Decrypt and kms:GenerateDataKey*\n actions on the key. These permissions are required because Amazon S3 must decrypt and read data\n from the encrypted file parts before it completes the multipart upload. For more\n information, see Multipart upload API\n and permissions in the Amazon S3 User Guide.

\n\n

If your Identity and Access Management (IAM) user or role is in the same Amazon Web Services account\n as the KMS key, then you must have these permissions on the key policy. If your IAM\n user or role belongs to a different account than the key, then you must have the\n permissions on both the key policy and your IAM user or role.

\n\n\n

For more information, see Protecting\n Data Using Server-Side Encryption.

\n\n
\n
Access Permissions
\n
\n

When copying an object, you can optionally specify the accounts or groups that\n should be granted specific permissions on the new object. There are two ways to\n grant the permissions using the request headers:

\n
    \n
  • \n

    Specify a canned ACL with the x-amz-acl request header. For\n more information, see Canned ACL.

    \n
  • \n
  • \n

    Specify access permissions explicitly with the\n x-amz-grant-read, x-amz-grant-read-acp,\n x-amz-grant-write-acp, and\n x-amz-grant-full-control headers. These parameters map to\n the set of permissions that Amazon S3 supports in an ACL. For more information,\n see Access Control List (ACL)\n Overview.

    \n
  • \n
\n

You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.

\n
\n
Server-Side- Encryption-Specific Request Headers
\n
\n

You can optionally tell Amazon S3 to encrypt data at rest using server-side\n encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts\n your data as it writes it to disks in its data centers and decrypts it when you\n access it. The option you use depends on whether you want to use Amazon Web Services managed\n encryption keys or provide your own encryption key.

\n
    \n
  • \n

    Use encryption keys managed by Amazon S3 or customer managed key stored\n in Amazon Web Services Key Management Service (Amazon Web Services KMS) – If you want Amazon Web Services to manage the keys\n used to encrypt data, specify the following headers in the request.

    \n
      \n
    • \n

      x-amz-server-side-encryption

      \n
    • \n
    • \n

      x-amz-server-side-encryption-aws-kms-key-id

      \n
    • \n
    • \n

      x-amz-server-side-encryption-context

      \n
    • \n
    \n \n

    If you specify x-amz-server-side-encryption:aws:kms, but\n don't provide x-amz-server-side-encryption-aws-kms-key-id,\n Amazon S3 uses the Amazon Web Services managed key in Amazon Web Services KMS to protect the data.

    \n
    \n \n

    All GET and PUT requests for an object protected by Amazon Web Services KMS fail if\n you don't make them with SSL or by using SigV4.

    \n
    \n

    For more information about server-side encryption with KMS key (SSE-KMS),\n see Protecting Data Using Server-Side Encryption with KMS keys.

    \n
  • \n
  • \n

    Use customer-provided encryption keys – If you want to manage your own\n encryption keys, provide all the following headers in the request.

    \n
      \n
    • \n

      x-amz-server-side-encryption-customer-algorithm

      \n
    • \n
    • \n

      x-amz-server-side-encryption-customer-key

      \n
    • \n
    • \n

      x-amz-server-side-encryption-customer-key-MD5

      \n
    • \n
    \n

    For more information about server-side encryption with KMS keys (SSE-KMS),\n see Protecting Data Using Server-Side Encryption with KMS keys.

    \n
  • \n
\n
\n
Access-Control-List (ACL)-Specific Request Headers
\n
\n

You also can use the following access control–related headers with this\n operation. By default, all objects are private. Only the owner has full access\n control. When adding a new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added\n to the access control list (ACL) on the object. For more information, see Using ACLs. With this\n operation, you can grant access permissions using one of the following two\n methods:

\n
    \n
  • \n

    Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of\n predefined ACLs, known as canned ACLs. Each canned ACL\n has a predefined set of grantees and permissions. For more information, see\n Canned\n ACL.

    \n
  • \n
  • \n

    Specify access permissions explicitly — To explicitly grant access\n permissions to specific Amazon Web Services accounts or groups, use the following headers.\n Each header maps to specific permissions that Amazon S3 supports in an ACL. For\n more information, see Access\n Control List (ACL) Overview. In the header, you specify a list of\n grantees who get the specific permission. To grant permissions explicitly,\n use:

    \n
      \n
    • \n

      x-amz-grant-read

      \n
    • \n
    • \n

      x-amz-grant-write

      \n
    • \n
    • \n

      x-amz-grant-read-acp

      \n
    • \n
    • \n

      x-amz-grant-write-acp

      \n
    • \n
    • \n

      x-amz-grant-full-control

      \n
    • \n
    \n

    You specify each grantee as a type=value pair, where the type is one of\n the following:

    \n
      \n
    • \n

      \n id – if the value specified is the canonical user ID\n of an Amazon Web Services account

      \n
    • \n
    • \n

      \n uri – if you are granting permissions to a predefined\n group

      \n
    • \n
    • \n

      \n emailAddress – if the value specified is the email\n address of an Amazon Web Services account

      \n \n

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      \n
        \n
      • \n

        US East (N. Virginia)

        \n
      • \n
      • \n

        US West (N. California)

        \n
      • \n
      • \n

        US West (Oregon)

        \n
      • \n
      • \n

        Asia Pacific (Singapore)

        \n
      • \n
      • \n

        Asia Pacific (Sydney)

        \n
      • \n
      • \n

        Asia Pacific (Tokyo)

        \n
      • \n
      • \n

        Europe (Ireland)

        \n
      • \n
      • \n

        South America (São Paulo)

        \n
      • \n
      \n

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      \n
      \n
    • \n
    \n

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    \n

    \n x-amz-grant-read: id=\"11112222333\", id=\"444455556666\" \n

    \n
  • \n
\n\n
\n
\n\n

The following operations are related to CreateMultipartUpload:

\n ", + "smithy.api#documentation": "

This action initiates a multipart upload and returns an upload ID. This upload ID is\n used to associate all of the parts in the specific multipart upload. You specify this\n upload ID in each of your subsequent upload part requests (see UploadPart). You also include this\n upload ID in the final request to either complete or abort the multipart upload\n request.

\n\n

For more information about multipart uploads, see Multipart Upload Overview.

\n\n

If you have configured a lifecycle rule to abort incomplete multipart uploads, the\n upload must complete within the number of days specified in the bucket lifecycle\n configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort\n action and Amazon S3 aborts the multipart upload. For more information, see Aborting\n Incomplete Multipart Uploads Using a Bucket Lifecycle Policy.

\n\n

For information about the permissions required to use the multipart upload API, see\n Multipart Upload and\n Permissions.

\n\n

For request signing, multipart upload is just a series of regular requests. You initiate\n a multipart upload, send one or more requests to upload parts, and then complete the\n multipart upload process. You sign each request individually. There is nothing special\n about signing multipart upload requests. For more information about signing, see Authenticating\n Requests (Amazon Web Services Signature Version 4).

\n\n \n

After you initiate a multipart upload and upload one or more parts, to stop being\n charged for storing the uploaded parts, you must either complete or abort the multipart\n upload. Amazon S3 frees up the space used to store the parts and stop charging you for\n storing them only after you either complete or abort a multipart upload.

\n
\n\n

You can optionally request server-side encryption. For server-side encryption, Amazon S3\n encrypts your data as it writes it to disks in its data centers and decrypts it when you\n access it. You can provide your own encryption key, or use Amazon Web Services KMS keys or Amazon S3-managed encryption keys. If you choose to provide\n your own encryption key, the request headers you provide in UploadPart and UploadPartCopy requests must match the headers you used in the request to\n initiate the upload by using CreateMultipartUpload.

\n

To perform a multipart upload with encryption using an Amazon Web Services KMS key, the requester must\n have permission to the kms:Decrypt and kms:GenerateDataKey*\n actions on the key. These permissions are required because Amazon S3 must decrypt and read data\n from the encrypted file parts before it completes the multipart upload. For more\n information, see Multipart upload API\n and permissions in the Amazon S3 User Guide.

\n\n

If your Identity and Access Management (IAM) user or role is in the same Amazon Web Services account\n as the KMS key, then you must have these permissions on the key policy. If your IAM\n user or role belongs to a different account than the key, then you must have the\n permissions on both the key policy and your IAM user or role.

\n\n\n

For more information, see Protecting\n Data Using Server-Side Encryption.

\n\n
\n
Access Permissions
\n
\n

When copying an object, you can optionally specify the accounts or groups that\n should be granted specific permissions on the new object. There are two ways to\n grant the permissions using the request headers:

\n
    \n
  • \n

    Specify a canned ACL with the x-amz-acl request header. For\n more information, see Canned ACL.

    \n
  • \n
  • \n

    Specify access permissions explicitly with the\n x-amz-grant-read, x-amz-grant-read-acp,\n x-amz-grant-write-acp, and\n x-amz-grant-full-control headers. These parameters map to\n the set of permissions that Amazon S3 supports in an ACL. For more information,\n see Access Control List (ACL)\n Overview.

    \n
  • \n
\n

You can use either a canned ACL or specify access permissions explicitly. You\n cannot do both.

\n
\n
Server-Side- Encryption-Specific Request Headers
\n
\n

You can optionally tell Amazon S3 to encrypt data at rest using server-side\n encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts\n your data as it writes it to disks in its data centers and decrypts it when you\n access it. The option you use depends on whether you want to use Amazon Web Services managed\n encryption keys or provide your own encryption key.

\n
    \n
  • \n

    Use encryption keys managed by Amazon S3 or customer managed key stored\n in Amazon Web Services Key Management Service (Amazon Web Services KMS) – If you want Amazon Web Services to manage the keys\n used to encrypt data, specify the following headers in the request.

    \n
      \n
    • \n

      \n x-amz-server-side-encryption\n

      \n
    • \n
    • \n

      \n x-amz-server-side-encryption-aws-kms-key-id\n

      \n
    • \n
    • \n

      \n x-amz-server-side-encryption-context\n

      \n
    • \n
    \n \n

    If you specify x-amz-server-side-encryption:aws:kms, but\n don't provide x-amz-server-side-encryption-aws-kms-key-id,\n Amazon S3 uses the Amazon Web Services managed key in Amazon Web Services KMS to protect the data.

    \n
    \n \n

    All GET and PUT requests for an object protected by Amazon Web Services KMS fail if\n you don't make them with SSL or by using SigV4.

    \n
    \n

    For more information about server-side encryption with KMS key (SSE-KMS),\n see Protecting Data Using Server-Side Encryption with KMS keys.

    \n
  • \n
  • \n

    Use customer-provided encryption keys – If you want to manage your own\n encryption keys, provide all the following headers in the request.

    \n
      \n
    • \n

      \n x-amz-server-side-encryption-customer-algorithm\n

      \n
    • \n
    • \n

      \n x-amz-server-side-encryption-customer-key\n

      \n
    • \n
    • \n

      \n x-amz-server-side-encryption-customer-key-MD5\n

      \n
    • \n
    \n

    For more information about server-side encryption with KMS keys (SSE-KMS),\n see Protecting Data Using Server-Side Encryption with KMS keys.

    \n
  • \n
\n
\n
Access-Control-List (ACL)-Specific Request Headers
\n
\n

You also can use the following access control–related headers with this\n operation. By default, all objects are private. Only the owner has full access\n control. When adding a new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added\n to the access control list (ACL) on the object. For more information, see Using ACLs. With this\n operation, you can grant access permissions using one of the following two\n methods:

\n
    \n
  • \n

    Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of\n predefined ACLs, known as canned ACLs. Each canned ACL\n has a predefined set of grantees and permissions. For more information, see\n Canned\n ACL.

    \n
  • \n
  • \n

    Specify access permissions explicitly — To explicitly grant access\n permissions to specific Amazon Web Services accounts or groups, use the following headers.\n Each header maps to specific permissions that Amazon S3 supports in an ACL. For\n more information, see Access\n Control List (ACL) Overview. In the header, you specify a list of\n grantees who get the specific permission. To grant permissions explicitly,\n use:

    \n
      \n
    • \n

      \n x-amz-grant-read\n

      \n
    • \n
    • \n

      \n x-amz-grant-write\n

      \n
    • \n
    • \n

      \n x-amz-grant-read-acp\n

      \n
    • \n
    • \n

      \n x-amz-grant-write-acp\n

      \n
    • \n
    • \n

      \n x-amz-grant-full-control\n

      \n
    • \n
    \n

    You specify each grantee as a type=value pair, where the type is one of\n the following:

    \n
      \n
    • \n

      \n id – if the value specified is the canonical user ID\n of an Amazon Web Services account

      \n
    • \n
    • \n

      \n uri – if you are granting permissions to a predefined\n group

      \n
    • \n
    • \n

      \n emailAddress – if the value specified is the email\n address of an Amazon Web Services account

      \n \n

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      \n
        \n
      • \n

        US East (N. Virginia)

        \n
      • \n
      • \n

        US West (N. California)

        \n
      • \n
      • \n

        US West (Oregon)

        \n
      • \n
      • \n

        Asia Pacific (Singapore)

        \n
      • \n
      • \n

        Asia Pacific (Sydney)

        \n
      • \n
      • \n

        Asia Pacific (Tokyo)

        \n
      • \n
      • \n

        Europe (Ireland)

        \n
      • \n
      • \n

        South America (São Paulo)

        \n
      • \n
      \n

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      \n
      \n
    • \n
    \n

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    \n

    \n x-amz-grant-read: id=\"11112222333\", id=\"444455556666\" \n

    \n
  • \n
\n\n
\n
\n\n

The following operations are related to CreateMultipartUpload:

\n ", "smithy.api#http": { "method": "POST", "uri": "/{Bucket}/{Key+}?uploads&x-id=CreateMultipartUpload", @@ -2024,7 +2263,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated. Does not return the access point ARN or access point alias if used.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated. Does not return the access point ARN or access point alias if used.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#xmlName": "Bucket" } }, @@ -2087,6 +2326,13 @@ "traits": { "smithy.api#httpHeader": "x-amz-request-charged" } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

The algorithm that was used to create a checksum of the object.

", + "smithy.api#httpHeader": "x-amz-checksum-algorithm" + } } }, "traits": { @@ -2106,7 +2352,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The name of the bucket to which to initiate the upload

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The name of the bucket to which to initiate the upload

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2289,16 +2535,23 @@ "ObjectLockLegalHoldStatus": { "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", "traits": { - "smithy.api#documentation": "

Specifies whether you want to apply a Legal Hold to the uploaded object.

", + "smithy.api#documentation": "

Specifies whether you want to apply a legal hold to the uploaded object.

", "smithy.api#httpHeader": "x-amz-object-lock-legal-hold" } }, "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm you want Amazon S3 to use to create the checksum for the object. For more information, see\n Checking object integrity in\n the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-algorithm" + } } } }, @@ -2416,7 +2669,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2450,7 +2703,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2484,7 +2737,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2561,7 +2814,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2595,7 +2848,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2637,7 +2890,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2671,7 +2924,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2705,7 +2958,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2739,7 +2992,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2759,7 +3012,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2793,7 +3046,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2827,7 +3080,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -2960,7 +3213,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name of the bucket containing the object.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name of the bucket containing the object.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2996,14 +3249,14 @@ "BypassGovernanceRetention": { "target": "com.amazonaws.s3#BypassGovernanceRetention", "traits": { - "smithy.api#documentation": "

Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process\n this operation. To use this header, you must have the s3:PutBucketPublicAccessBlock\n permission.

", + "smithy.api#documentation": "

Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process\n this operation. To use this header, you must have the s3:BypassGovernanceRetention\n permission.

", "smithy.api#httpHeader": "x-amz-bypass-governance-retention" } }, "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -3044,7 +3297,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name containing the objects from which to remove the tags.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name containing the objects from which to remove the tags.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3067,7 +3320,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -3082,13 +3335,16 @@ "target": "com.amazonaws.s3#DeleteObjectsOutput" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

This action enables you to delete multiple objects from a bucket using a single HTTP\n request. If you know the object keys that you want to delete, then this action provides\n a suitable alternative to sending individual delete requests, reducing per-request\n overhead.

\n\n

The request contains a list of up to 1000 keys that you want to delete. In the XML, you\n provide the object key names, and optionally, version IDs if you want to delete a specific\n version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a\n delete action and returns the result of that delete, success, or failure, in the\n response. Note that if the object specified in the request is not found, Amazon S3 returns the\n result as deleted.

\n\n

The action supports two modes for the response: verbose and quiet. By default, the\n action uses verbose mode in which the response includes the result of deletion of each\n key in your request. In quiet mode the response includes only keys where the delete\n action encountered an error. For a successful deletion, the action does not return\n any information about the delete in the response body.

\n\n

When performing this action on an MFA Delete enabled bucket, that attempts to delete\n any versioned objects, you must include an MFA token. If you do not provide one, the entire\n request will fail, even if there are non-versioned objects you are trying to delete. If you\n provide an invalid token, whether there are versioned keys in the request or not, the\n entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA\n Delete.

\n\n

Finally, the Content-MD5 header is required for all Multi-Object Delete requests. Amazon\n S3 uses the header value to ensure that your request body has not been altered in\n transit.

\n\n

The following operations are related to DeleteObjects:

\n ", "smithy.api#http": { "method": "POST", "uri": "/{Bucket}?delete&x-id=DeleteObjects", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#DeleteObjectsOutput": { @@ -3126,7 +3382,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name containing the objects to delete.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name containing the objects to delete.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3156,16 +3412,23 @@ "BypassGovernanceRetention": { "target": "com.amazonaws.s3#BypassGovernanceRetention", "traits": { - "smithy.api#documentation": "

Specifies whether you want to delete this object even if it has a Governance-type Object\n Lock in place. To use this header, you must have the s3:PutBucketPublicAccessBlock\n permission.

", + "smithy.api#documentation": "

Specifies whether you want to delete this object even if it has a Governance-type Object\n Lock in place. To use this header, you must have the s3:BypassGovernanceRetention\n permission.

", "smithy.api#httpHeader": "x-amz-bypass-governance-retention" } }, "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

\n

This checksum algorithm must be the same for all parts and it match the checksum\n value supplied in the CreateMultipartUpload request.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } } } }, @@ -3197,7 +3460,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -3335,7 +3598,7 @@ "KMSKeyId": { "target": "com.amazonaws.s3#SSEKMSKeyId", "traits": { - "smithy.api#documentation": "

If the encryption type is aws:kms, this optional value specifies the ID of\n the symmetric customer managed key to use for encryption of job results. Amazon S3 only\n supports symmetric keys. For more information, see Using symmetric and\n asymmetric keys in the Amazon Web Services Key Management Service Developer Guide.

" + "smithy.api#documentation": "

If the encryption type is aws:kms, this optional value specifies the ID of\n the symmetric customer managed key to use for encryption of job results. Amazon S3 only\n supports symmetric keys. For more information, see Using symmetric and\n asymmetric keys in the Amazon Web Services Key Management Service Developer\n Guide.

" } }, "KMSContext": { @@ -3728,7 +3991,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -3786,7 +4049,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -3843,7 +4106,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -3858,7 +4121,7 @@ "target": "com.amazonaws.s3#GetBucketCorsOutput" }, "traits": { - "smithy.api#documentation": "

Returns the cors configuration information set for the bucket.

\n\n

To use this operation, you must have permission to perform the s3:GetBucketCORS action.\n By default, the bucket owner has this permission and can grant it to others.

\n\n

For more information about cors, see Enabling\n Cross-Origin Resource Sharing.

\n\n

The following operations are related to GetBucketCors:

\n ", + "smithy.api#documentation": "

Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the\n bucket.

\n\n

To use this operation, you must have permission to perform the\n s3:GetBucketCORS action. By default, the bucket owner has this permission\n and can grant it to others.

\n\n

For more information about CORS, see Enabling Cross-Origin Resource\n Sharing.

\n\n

The following operations are related to GetBucketCors:

\n ", "smithy.api#http": { "method": "GET", "uri": "/{Bucket}?cors", @@ -3896,7 +4159,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -3944,7 +4207,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4051,7 +4314,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4104,7 +4367,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4156,7 +4419,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4204,7 +4467,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4261,7 +4524,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4298,7 +4561,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4347,7 +4610,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4396,7 +4659,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4445,7 +4708,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4493,7 +4756,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4544,7 +4807,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4559,7 +4822,7 @@ "target": "com.amazonaws.s3#GetBucketTaggingOutput" }, "traits": { - "smithy.api#documentation": "

Returns the tag set associated with the bucket.

\n

To use this operation, you must have permission to perform the\n s3:GetBucketTagging action. By default, the bucket owner has this\n permission and can grant this permission to others.

\n\n

\n GetBucketTagging has the following special error:

\n
    \n
  • \n

    Error code: NoSuchTagSetError\n

    \n
      \n
    • \n

      Description: There is no tag set associated with the bucket.

      \n
    • \n
    \n
  • \n
\n\n

The following operations are related to GetBucketTagging:

\n ", + "smithy.api#documentation": "

Returns the tag set associated with the bucket.

\n

To use this operation, you must have permission to perform the\n s3:GetBucketTagging action. By default, the bucket owner has this\n permission and can grant this permission to others.

\n\n

\n GetBucketTagging has the following special error:

\n
    \n
  • \n

    Error code: NoSuchTagSet\n

    \n
      \n
    • \n

      Description: There is no tag set associated with the bucket.

      \n
    • \n
    \n
  • \n
\n\n

The following operations are related to GetBucketTagging:

\n ", "smithy.api#http": { "method": "GET", "uri": "/{Bucket}?tagging", @@ -4596,7 +4859,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4654,7 +4917,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4723,7 +4986,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4746,7 +5009,16 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves objects from Amazon S3. To use GET, you must have READ\n access to the object. If you grant READ access to the anonymous user, you can\n return the object without using an authorization header.

\n\n

An Amazon S3 bucket has no directory hierarchy such as you would find in a typical computer\n file system. You can, however, create a logical hierarchy by using object key names that\n imply a folder structure. For example, instead of naming an object sample.jpg,\n you can name it photos/2006/February/sample.jpg.

\n\n

To get an object from such a logical hierarchy, specify the full key name for the object\n in the GET operation. For a virtual hosted-style request example, if you have\n the object photos/2006/February/sample.jpg, specify the resource as\n /photos/2006/February/sample.jpg. For a path-style request example, if you\n have the object photos/2006/February/sample.jpg in the bucket named\n examplebucket, specify the resource as\n /examplebucket/photos/2006/February/sample.jpg. For more information about\n request types, see HTTP Host Header Bucket Specification.

\n\n

To distribute large files to many people, you can save bandwidth costs by using\n BitTorrent. For more information, see Amazon S3\n Torrent. For more information about returning the ACL of an object, see GetObjectAcl.

\n\n

If the object you are retrieving is stored in the S3 Glacier or\n S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or\n S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a\n copy using RestoreObject. Otherwise, this action returns an\n InvalidObjectStateError error. For information about restoring archived\n objects, see Restoring Archived\n Objects.

\n\n

Encryption request headers, like x-amz-server-side-encryption, should not\n be sent for GET requests if your object uses server-side encryption with KMS keys (SSE-KMS) \n or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your\n object does use these types of keys, you’ll get an HTTP 400 BadRequest error.

\n

If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object,\n you must use the following headers:

\n
    \n
  • \n

    x-amz-server-side-encryption-customer-algorithm

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key-MD5

    \n
  • \n
\n

For more information about SSE-C, see Server-Side Encryption (Using\n Customer-Provided Encryption Keys).

\n\n

Assuming you have the relevant permission to read object tags, the response also returns the\n x-amz-tagging-count header that provides the count of number of tags\n associated with the object. You can use GetObjectTagging to retrieve\n the tag set associated with an object.

\n\n

\n Permissions\n

\n

You need the relevant read object (or version) permission for this operation. For more\n information, see Specifying Permissions\n in a Policy. If the object you request does not exist, the error Amazon S3 returns\n depends on whether you also have the s3:ListBucket permission.

\n
    \n
  • \n

    If you have the s3:ListBucket permission on the bucket, Amazon S3 will\n return an HTTP status code 404 (\"no such key\") error.

    \n
  • \n
  • \n

    If you don’t have the s3:ListBucket permission, Amazon S3 will return an\n HTTP status code 403 (\"access denied\") error.

    \n
  • \n
\n\n\n

\n Versioning\n

\n

By default, the GET action returns the current version of an object. To return a\n different version, use the versionId subresource.

\n\n \n
    \n
  • \n

    \n If you supply a versionId, you need the s3:GetObjectVersion permission to\n access a specific version of an object. If you request a specific version, you do not need to have\n the s3:GetObject permission.\n

    \n
  • \n
  • \n

    If the current version of the object is a delete marker, Amazon S3 behaves as if the\n object was deleted and includes x-amz-delete-marker: true in the\n response.

    \n
  • \n
\n
\n\n\n

For more information about versioning, see PutBucketVersioning.

\n\n

\n Overriding Response Header Values\n

\n

There are times when you want to override certain response header values in a GET\n response. For example, you might override the Content-Disposition response header value in\n your GET request.

\n\n

You can override values for a set of response headers using the following query\n parameters. These response header values are sent only on a successful request, that is,\n when status code 200 OK is returned. The set of headers you can override using these\n parameters is a subset of the headers that Amazon S3 accepts when you create an object. The\n response headers that you can override for the GET response are Content-Type,\n Content-Language, Expires, Cache-Control,\n Content-Disposition, and Content-Encoding. To override these\n header values in the GET response, you use the following request parameters.

\n\n \n

You must sign the request, either using an Authorization header or a presigned URL,\n when using these parameters. They cannot be used with an unsigned (anonymous)\n request.

\n
\n
    \n
  • \n

    \n response-content-type\n

    \n
  • \n
  • \n

    \n response-content-language\n

    \n
  • \n
  • \n

    \n response-expires\n

    \n
  • \n
  • \n

    \n response-cache-control\n

    \n
  • \n
  • \n

    \n response-content-disposition\n

    \n
  • \n
  • \n

    \n response-content-encoding\n

    \n
  • \n
\n\n

\n Additional Considerations about Request Headers\n

\n\n

If both of the If-Match and If-Unmodified-Since headers are\n present in the request as follows: If-Match condition evaluates to\n true, and; If-Unmodified-Since condition evaluates to\n false; then, S3 returns 200 OK and the data requested.

\n\n

If both of the If-None-Match and If-Modified-Since headers are\n present in the request as follows: If-None-Match condition evaluates to\n false, and; If-Modified-Since condition evaluates to\n true; then, S3 returns 304 Not Modified response code.

\n\n

For more information about conditional requests, see RFC 7232.

\n\n

The following operations are related to GetObject:

\n ", + "aws.protocols#httpChecksum": { + "requestValidationModeMember": "ChecksumMode", + "responseAlgorithms": [ + "CRC32", + "CRC32C", + "SHA256", + "SHA1" + ] + }, + "smithy.api#documentation": "

Retrieves objects from Amazon S3. To use GET, you must have READ\n access to the object. If you grant READ access to the anonymous user, you can\n return the object without using an authorization header.

\n\n

An Amazon S3 bucket has no directory hierarchy such as you would find in a typical computer\n file system. You can, however, create a logical hierarchy by using object key names that\n imply a folder structure. For example, instead of naming an object sample.jpg,\n you can name it photos/2006/February/sample.jpg.

\n\n

To get an object from such a logical hierarchy, specify the full key name for the object\n in the GET operation. For a virtual hosted-style request example, if you have\n the object photos/2006/February/sample.jpg, specify the resource as\n /photos/2006/February/sample.jpg. For a path-style request example, if you\n have the object photos/2006/February/sample.jpg in the bucket named\n examplebucket, specify the resource as\n /examplebucket/photos/2006/February/sample.jpg. For more information about\n request types, see HTTP Host Header Bucket Specification.

\n\n

For more information about returning the ACL of an object, see GetObjectAcl.

\n\n

If the object you are retrieving is stored in the S3 Glacier or\n S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or\n S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a\n copy using RestoreObject. Otherwise, this action returns an\n InvalidObjectStateError error. For information about restoring archived\n objects, see Restoring Archived\n Objects.

\n\n

Encryption request headers, like x-amz-server-side-encryption, should not\n be sent for GET requests if your object uses server-side encryption with KMS keys (SSE-KMS) \n or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your\n object does use these types of keys, you’ll get an HTTP 400 BadRequest error.

\n

If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object,\n you must use the following headers:

\n
    \n
  • \n

    x-amz-server-side-encryption-customer-algorithm

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key-MD5

    \n
  • \n
\n

For more information about SSE-C, see Server-Side Encryption (Using\n Customer-Provided Encryption Keys).

\n\n

Assuming you have the relevant permission to read object tags, the response also returns the\n x-amz-tagging-count header that provides the count of number of tags\n associated with the object. You can use GetObjectTagging to retrieve\n the tag set associated with an object.

\n\n

\n Permissions\n

\n

You need the relevant read object (or version) permission for this operation. For more\n information, see Specifying Permissions\n in a Policy. If the object you request does not exist, the error Amazon S3 returns\n depends on whether you also have the s3:ListBucket permission.

\n
    \n
  • \n

    If you have the s3:ListBucket permission on the bucket, Amazon S3 will\n return an HTTP status code 404 (\"no such key\") error.

    \n
  • \n
  • \n

    If you don’t have the s3:ListBucket permission, Amazon S3 will return an\n HTTP status code 403 (\"access denied\") error.

    \n
  • \n
\n\n\n

\n Versioning\n

\n

By default, the GET action returns the current version of an object. To return a\n different version, use the versionId subresource.

\n\n \n
    \n
  • \n

    \n If you supply a versionId, you need the s3:GetObjectVersion permission to\n access a specific version of an object. If you request a specific version, you do not need to have\n the s3:GetObject permission.\n

    \n
  • \n
  • \n

    If the current version of the object is a delete marker, Amazon S3 behaves as if the\n object was deleted and includes x-amz-delete-marker: true in the\n response.

    \n
  • \n
\n
\n\n\n

For more information about versioning, see PutBucketVersioning.

\n\n

\n Overriding Response Header Values\n

\n

There are times when you want to override certain response header values in a GET\n response. For example, you might override the Content-Disposition response\n header value in your GET request.

\n\n

You can override values for a set of response headers using the following query\n parameters. These response header values are sent only on a successful request, that is,\n when status code 200 OK is returned. The set of headers you can override using these\n parameters is a subset of the headers that Amazon S3 accepts when you create an object. The\n response headers that you can override for the GET response are Content-Type,\n Content-Language, Expires, Cache-Control,\n Content-Disposition, and Content-Encoding. To override these\n header values in the GET response, you use the following request parameters.

\n\n \n

You must sign the request, either using an Authorization header or a presigned URL,\n when using these parameters. They cannot be used with an unsigned (anonymous)\n request.

\n
\n
    \n
  • \n

    \n response-content-type\n

    \n
  • \n
  • \n

    \n response-content-language\n

    \n
  • \n
  • \n

    \n response-expires\n

    \n
  • \n
  • \n

    \n response-cache-control\n

    \n
  • \n
  • \n

    \n response-content-disposition\n

    \n
  • \n
  • \n

    \n response-content-encoding\n

    \n
  • \n
\n\n

\n Additional Considerations about Request Headers\n

\n\n

If both of the If-Match and If-Unmodified-Since headers are\n present in the request as follows: If-Match condition evaluates to\n true, and; If-Unmodified-Since condition evaluates to\n false; then, S3 returns 200 OK and the data requested.

\n\n

If both of the If-None-Match and If-Modified-Since headers are\n present in the request as follows: If-None-Match condition evaluates to\n false, and; If-Modified-Since condition evaluates to\n true; then, S3 returns 304 Not Modified response code.

\n\n

For more information about conditional requests, see RFC 7232.

\n\n

The following operations are related to GetObject:

\n ", "smithy.api#http": { "method": "GET", "uri": "/{Bucket}/{Key+}?x-id=GetObject", @@ -4768,7 +5040,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the access control list (ACL) of an object. To use this operation, you must have\n READ_ACP access to the object.

\n

This action is not supported by Amazon S3 on Outposts.

\n

\n Versioning\n

\n

By default, GET returns ACL information about the current version of an object. To\n return ACL information about a different version, use the versionId subresource.

\n \n

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, \n requests to read ACLs are still supported and return the bucket-owner-full-control \n ACL with the owner being the account that created the bucket. For more information, see \n \n Controlling object ownership and disabling ACLs in the Amazon S3 User Guide.

\n
\n

The following operations are related to GetObjectAcl:

\n ", + "smithy.api#documentation": "

Returns the access control list (ACL) of an object. To use this operation, you must have\n s3:GetObjectAcl permissions or READ_ACP access to the object.\n For more information, see Mapping of ACL permissions and access policy permissions in the Amazon S3\n User Guide\n

\n

This action is not supported by Amazon S3 on Outposts.

\n

\n Versioning\n

\n

By default, GET returns ACL information about the current version of an object. To\n return ACL information about a different version, use the versionId subresource.

\n \n

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, \n requests to read ACLs are still supported and return the bucket-owner-full-control \n ACL with the owner being the account that created the bucket. For more information, see \n \n Controlling object ownership and disabling ACLs in the Amazon S3 User Guide.

\n
\n

The following operations are related to GetObjectAcl:

\n ", "smithy.api#http": { "method": "GET", "uri": "/{Bucket}/{Key+}?acl", @@ -4838,12 +5110,227 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } } }, + "com.amazonaws.s3#GetObjectAttributes": { + "type": "operation", + "input": { + "target": "com.amazonaws.s3#GetObjectAttributesRequest" + }, + "output": { + "target": "com.amazonaws.s3#GetObjectAttributesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.s3#NoSuchKey" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves all the metadata from an object without returning the object itself. This\n action is useful if you're interested only in an object's metadata. To use\n GetObjectAttributes, you must have READ access to the object.

\n\n

\n GetObjectAttributes combines the functionality of\n GetObjectAcl, GetObjectLegalHold,\n GetObjectLockConfiguration, GetObjectRetention,\n GetObjectTagging, HeadObject, and ListParts. All\n of the data returned with each of those individual calls can be returned with a single call\n to GetObjectAttributes.

\n\n

If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the\n metadata from the object, you must use the following headers:

\n
    \n
  • \n

    \n x-amz-server-side-encryption-customer-algorithm\n

    \n
  • \n
  • \n

    \n x-amz-server-side-encryption-customer-key\n

    \n
  • \n
  • \n

    \n x-amz-server-side-encryption-customer-key-MD5\n

    \n
  • \n
\n

For more information about SSE-C, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys) in the\n Amazon S3 User Guide.

\n \n
    \n
  • \n

    Encryption request headers, such as\n x-amz-server-side-encryption, should not be sent for GET requests\n if your object uses server-side encryption with Amazon Web Services KMS keys stored in Amazon Web Services Key\n Management Service (SSE-KMS) or server-side encryption with Amazon S3 managed\n encryption keys (SSE-S3). If your object does use these types of keys, you'll get\n an HTTP 400 Bad Request error.

    \n
  • \n
  • \n

    \n The last modified property in this case is the creation date of the object.

    \n
  • \n
\n
\n\n

Consider the following when using request headers:

\n
    \n
  • \n

    If both of the If-Match and If-Unmodified-Since\n headers are present in the request as follows, then Amazon S3 returns the HTTP\n status code 200 OK and the data requested:

    \n
      \n
    • \n

      \n If-Match condition evaluates to true.

      \n
    • \n
    • \n

      \n If-Unmodified-Since condition evaluates to\n false.

      \n
    • \n
    \n
  • \n
  • \n

    If both of the If-None-Match and If-Modified-Since\n headers are present in the request as follows, then Amazon S3 returns the HTTP status code\n 304 Not Modified:

    \n
      \n
    • \n

      \n If-None-Match condition evaluates to\n false.

      \n
    • \n
    • \n

      \n If-Modified-Since condition evaluates to\n true.

      \n
    • \n
    \n
  • \n
\n\n

For more information about conditional requests, see RFC 7232.

\n\n

\n Permissions\n

\n

The permissions that you need to use this operation depend on whether the bucket is\n versioned. If the bucket is versioned, you need both the s3:GetObjectVersion\n and s3:GetObjectVersionAttributes permissions for this operation. If the\n bucket is not versioned, you need the s3:GetObject and\n s3:GetObjectAttributes permissions. For more information, see Specifying\n Permissions in a Policy in the Amazon S3 User Guide. If the\n object that you request does not exist, the error Amazon S3 returns depends on whether you also\n have the s3:ListBucket permission.

\n
    \n
  • \n

    If you have the s3:ListBucket permission on the bucket, Amazon S3\n returns an HTTP status code 404 Not Found (\"no such key\") error.

    \n
  • \n
  • \n

    If you don't have the s3:ListBucket permission, Amazon S3 returns an\n HTTP status code 403 Forbidden (\"access denied\") error.

    \n
  • \n
\n\n

The following actions are related to GetObjectAttributes:

\n ", + "smithy.api#http": { + "method": "GET", + "uri": "/{Bucket}/{Key+}?attributes", + "code": 200 + } + } + }, + "com.amazonaws.s3#GetObjectAttributesOutput": { + "type": "structure", + "members": { + "DeleteMarker": { + "target": "com.amazonaws.s3#DeleteMarker", + "traits": { + "smithy.api#documentation": "

Specifies whether the object retrieved was (true) or was not\n (false) a delete marker. If false, this response header does\n not appear in the response.

", + "smithy.api#httpHeader": "x-amz-delete-marker" + } + }, + "LastModified": { + "target": "com.amazonaws.s3#LastModified", + "traits": { + "smithy.api#documentation": "

The creation date of the object.

", + "smithy.api#httpHeader": "Last-Modified" + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The version ID of the object.

", + "smithy.api#httpHeader": "x-amz-version-id" + } + }, + "RequestCharged": { + "target": "com.amazonaws.s3#RequestCharged", + "traits": { + "smithy.api#httpHeader": "x-amz-request-charged" + } + }, + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

An ETag is an opaque identifier assigned by a web server to a specific version of a\n resource found at a URL.

" + } + }, + "Checksum": { + "target": "com.amazonaws.s3#Checksum", + "traits": { + "smithy.api#documentation": "

The checksum or digest of the object.

" + } + }, + "ObjectParts": { + "target": "com.amazonaws.s3#GetObjectAttributesParts", + "traits": { + "smithy.api#documentation": "

A collection of parts associated with a multipart upload.

" + } + }, + "StorageClass": { + "target": "com.amazonaws.s3#StorageClass", + "traits": { + "smithy.api#documentation": "

Provides the storage class information of the object. Amazon S3 returns this header for all\n objects except for S3 Standard storage class objects.

\n\n

For more information, see Storage\n Classes.

" + } + }, + "ObjectSize": { + "target": "com.amazonaws.s3#ObjectSize", + "traits": { + "smithy.api#documentation": "

The size of the object in bytes.

" + } + } + } + }, + "com.amazonaws.s3#GetObjectAttributesParts": { + "type": "structure", + "members": { + "TotalPartsCount": { + "target": "com.amazonaws.s3#PartsCount", + "traits": { + "smithy.api#documentation": "

The total number of parts.

", + "smithy.api#xmlName": "PartsCount" + } + }, + "PartNumberMarker": { + "target": "com.amazonaws.s3#PartNumberMarker", + "traits": { + "smithy.api#documentation": "

The marker for the current part.

" + } + }, + "NextPartNumberMarker": { + "target": "com.amazonaws.s3#NextPartNumberMarker", + "traits": { + "smithy.api#documentation": "

When a list is truncated, this element specifies the last part in the list, as well as\n the value to use for the PartNumberMarker request parameter in a subsequent\n request.

" + } + }, + "MaxParts": { + "target": "com.amazonaws.s3#MaxParts", + "traits": { + "smithy.api#documentation": "

The maximum number of parts allowed in the response.

" + } + }, + "IsTruncated": { + "target": "com.amazonaws.s3#IsTruncated", + "traits": { + "smithy.api#documentation": "

Indicates whether the returned list of parts is truncated. A value of\n true indicates that the list was truncated. A list can be truncated if the\n number of parts exceeds the limit returned in the MaxParts element.

" + } + }, + "Parts": { + "target": "com.amazonaws.s3#PartsList", + "traits": { + "smithy.api#documentation": "

A container for elements related to a particular part. A response can contain zero or\n more Parts elements.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Part" + } + } + }, + "traits": { + "smithy.api#documentation": "

A collection of parts associated with a multipart upload.

" + } + }, + "com.amazonaws.s3#GetObjectAttributesRequest": { + "type": "structure", + "members": { + "Bucket": { + "target": "com.amazonaws.s3#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the bucket that contains the object.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Key": { + "target": "com.amazonaws.s3#ObjectKey", + "traits": { + "smithy.api#documentation": "

The object key.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "VersionId": { + "target": "com.amazonaws.s3#ObjectVersionId", + "traits": { + "smithy.api#documentation": "

The version ID used to reference a specific version of the object.

", + "smithy.api#httpQuery": "versionId" + } + }, + "MaxParts": { + "target": "com.amazonaws.s3#MaxParts", + "traits": { + "smithy.api#documentation": "

Sets the maximum number of parts to return.

", + "smithy.api#httpHeader": "x-amz-max-parts" + } + }, + "PartNumberMarker": { + "target": "com.amazonaws.s3#PartNumberMarker", + "traits": { + "smithy.api#documentation": "

Specifies the part after which listing should begin. Only parts with higher part numbers\n will be listed.

", + "smithy.api#httpHeader": "x-amz-part-number-marker" + } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

Specifies the algorithm to use when encrypting the object (for example,\n AES256).

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSECustomerKey": { + "target": "com.amazonaws.s3#SSECustomerKey", + "traits": { + "smithy.api#documentation": "

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This\n value is used to store the object and then it is discarded; Amazon S3 does not store the\n encryption key. The key must be appropriate for use with the algorithm specified in the\n x-amz-server-side-encryption-customer-algorithm header.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses\n this header for a message integrity check to ensure that the encryption key was transmitted\n without error.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } + }, + "RequestPayer": { + "target": "com.amazonaws.s3#RequestPayer", + "traits": { + "smithy.api#httpHeader": "x-amz-request-payer" + } + }, + "ExpectedBucketOwner": { + "target": "com.amazonaws.s3#AccountId", + "traits": { + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", + "smithy.api#httpHeader": "x-amz-expected-bucket-owner" + } + }, + "ObjectAttributes": { + "target": "com.amazonaws.s3#ObjectAttributesList", + "traits": { + "smithy.api#documentation": "

An XML header that specifies the fields at the root level that you want returned in\n the response. Fields that you do not specify are not returned.

", + "smithy.api#httpHeader": "x-amz-object-attributes", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.s3#GetObjectLegalHold": { "type": "operation", "input": { @@ -4853,7 +5340,7 @@ "target": "com.amazonaws.s3#GetObjectLegalHoldOutput" }, "traits": { - "smithy.api#documentation": "

Gets an object's current Legal Hold status. For more information, see Locking Objects.

\n

This action is not supported by Amazon S3 on Outposts.

", + "smithy.api#documentation": "

Gets an object's current legal hold status. For more information, see Locking\n Objects.

\n

This action is not supported by Amazon S3 on Outposts.

\n\n

The following action is related to GetObjectLegalHold:

\n ", "smithy.api#http": { "method": "GET", "uri": "/{Bucket}/{Key+}?legal-hold", @@ -4867,7 +5354,7 @@ "LegalHold": { "target": "com.amazonaws.s3#ObjectLockLegalHold", "traits": { - "smithy.api#documentation": "

The current Legal Hold status for the specified object.

", + "smithy.api#documentation": "

The current legal hold status for the specified object.

", "smithy.api#httpPayload": {} } } @@ -4879,7 +5366,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name containing the object whose Legal Hold status you want to retrieve.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name containing the object whose legal hold status you want to retrieve.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4887,7 +5374,7 @@ "Key": { "target": "com.amazonaws.s3#ObjectKey", "traits": { - "smithy.api#documentation": "

The key name for the object whose Legal Hold status you want to retrieve.

", + "smithy.api#documentation": "

The key name for the object whose legal hold status you want to retrieve.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4895,7 +5382,7 @@ "VersionId": { "target": "com.amazonaws.s3#ObjectVersionId", "traits": { - "smithy.api#documentation": "

The version ID of the object whose Legal Hold status you want to retrieve.

", + "smithy.api#documentation": "

The version ID of the object whose legal hold status you want to retrieve.

", "smithy.api#httpQuery": "versionId" } }, @@ -4908,7 +5395,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4923,7 +5410,7 @@ "target": "com.amazonaws.s3#GetObjectLockConfigurationOutput" }, "traits": { - "smithy.api#documentation": "

Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock\n configuration will be applied by default to every new object placed in the specified\n bucket. For more information, see Locking\n Objects.

", + "smithy.api#documentation": "

Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock\n configuration will be applied by default to every new object placed in the specified\n bucket. For more information, see Locking\n Objects.

\n\n

The following action is related to GetObjectLockConfiguration:

\n ", "smithy.api#http": { "method": "GET", "uri": "/{Bucket}?object-lock", @@ -4957,7 +5444,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -4990,7 +5477,7 @@ "Expiration": { "target": "com.amazonaws.s3#Expiration", "traits": { - "smithy.api#documentation": "

If the object expiration is configured (see PUT Bucket lifecycle), the response includes\n this header. It includes the expiry-date and rule-id key-value pairs providing object\n expiration information. The value of the rule-id is URL encoded.

", + "smithy.api#documentation": "

If the object expiration is configured (see PUT Bucket lifecycle), the response includes\n this header. It includes the expiry-date and rule-id key-value\n pairs providing object expiration information. The value of the rule-id is\n URL-encoded.

", "smithy.api#httpHeader": "x-amz-expiration" } }, @@ -5018,10 +5505,38 @@ "ETag": { "target": "com.amazonaws.s3#ETag", "traits": { - "smithy.api#documentation": "

An ETag is an opaque identifier assigned by a web server to a specific version of a\n resource found at a URL.

", + "smithy.api#documentation": "

An entity tag (ETag) is an opaque identifier assigned by a web server to a specific\n version of a resource found at a URL.

", "smithy.api#httpHeader": "ETag" } }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32c" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha1" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha256" + } + }, "MissingMeta": { "target": "com.amazonaws.s3#MissingMeta", "traits": { @@ -5157,7 +5672,7 @@ "PartsCount": { "target": "com.amazonaws.s3#PartsCount", "traits": { - "smithy.api#documentation": "

The count of parts this object has.

", + "smithy.api#documentation": "

The count of parts this object has. This value is only returned if you specify partNumber\n in your request and the object was uploaded as a multipart upload.

", "smithy.api#httpHeader": "x-amz-mp-parts-count" } }, @@ -5197,7 +5712,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name containing the object.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using an Object Lambda access point the hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name containing the object.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using an Object Lambda access point the hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5205,28 +5720,28 @@ "IfMatch": { "target": "com.amazonaws.s3#IfMatch", "traits": { - "smithy.api#documentation": "

Return the object only if its entity tag (ETag) is the same as the one specified,\n otherwise return a 412 (precondition failed).

", + "smithy.api#documentation": "

Return the object only if its entity tag (ETag) is the same as the one specified;\n otherwise, return a 412 (precondition failed) error.

", "smithy.api#httpHeader": "If-Match" } }, "IfModifiedSince": { "target": "com.amazonaws.s3#IfModifiedSince", "traits": { - "smithy.api#documentation": "

Return the object only if it has been modified since the specified time, otherwise\n return a 304 (not modified).

", + "smithy.api#documentation": "

Return the object only if it has been modified since the specified time; otherwise,\n return a 304 (not modified) error.

", "smithy.api#httpHeader": "If-Modified-Since" } }, "IfNoneMatch": { "target": "com.amazonaws.s3#IfNoneMatch", "traits": { - "smithy.api#documentation": "

Return the object only if its entity tag (ETag) is different from the one specified,\n otherwise return a 304 (not modified).

", + "smithy.api#documentation": "

Return the object only if its entity tag (ETag) is different from the one specified;\n otherwise, return a 304 (not modified) error.

", "smithy.api#httpHeader": "If-None-Match" } }, "IfUnmodifiedSince": { "target": "com.amazonaws.s3#IfUnmodifiedSince", "traits": { - "smithy.api#documentation": "

Return the object only if it has not been modified since the specified time, otherwise\n return a 412 (precondition failed).

", + "smithy.api#documentation": "

Return the object only if it has not been modified since the specified time; otherwise,\n return a 412 (precondition failed) error.

", "smithy.api#httpHeader": "If-Unmodified-Since" } }, @@ -5331,9 +5846,16 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } + }, + "ChecksumMode": { + "target": "com.amazonaws.s3#ChecksumMode", + "traits": { + "smithy.api#documentation": "

To retrieve the checksum, this mode must be enabled.

", + "smithy.api#httpHeader": "x-amz-checksum-mode" + } } } }, @@ -5349,7 +5871,7 @@ "target": "com.amazonaws.s3#GetObjectRetentionOutput" }, "traits": { - "smithy.api#documentation": "

Retrieves an object's retention settings. For more information, see Locking Objects.

\n

This action is not supported by Amazon S3 on Outposts.

", + "smithy.api#documentation": "

Retrieves an object's retention settings. For more information, see Locking Objects.

\n

This action is not supported by Amazon S3 on Outposts.

\n\n

The following action is related to GetObjectRetention:

\n ", "smithy.api#http": { "method": "GET", "uri": "/{Bucket}/{Key+}?retention", @@ -5404,7 +5926,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -5419,7 +5941,7 @@ "target": "com.amazonaws.s3#GetObjectTaggingOutput" }, "traits": { - "smithy.api#documentation": "

Returns the tag-set of an object. You send the GET request against the tagging\n subresource associated with the object.

\n\n

To use this operation, you must have permission to perform the\n s3:GetObjectTagging action. By default, the GET action returns\n information about current version of an object. For a versioned bucket, you can have\n multiple versions of an object in your bucket. To retrieve tags of any other version, use\n the versionId query parameter. You also need permission for the\n s3:GetObjectVersionTagging action.

\n\n

By default, the bucket owner has this permission and can grant this permission to\n others.

\n\n

For information about the Amazon S3 object tagging feature, see Object Tagging.

\n\n

The following action is related to GetObjectTagging:

\n ", + "smithy.api#documentation": "

Returns the tag-set of an object. You send the GET request against the tagging\n subresource associated with the object.

\n\n

To use this operation, you must have permission to perform the\n s3:GetObjectTagging action. By default, the GET action returns\n information about current version of an object. For a versioned bucket, you can have\n multiple versions of an object in your bucket. To retrieve tags of any other version, use\n the versionId query parameter. You also need permission for the\n s3:GetObjectVersionTagging action.

\n\n

By default, the bucket owner has this permission and can grant this permission to\n others.

\n\n

For information about the Amazon S3 object tagging feature, see Object Tagging.

\n\n

The following actions are related to GetObjectTagging:

\n ", "smithy.api#http": { "method": "GET", "uri": "/{Bucket}/{Key+}?tagging", @@ -5455,7 +5977,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name containing the object for which to get the tagging information.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name containing the object for which to get the tagging information.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5478,7 +6000,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } }, @@ -5553,7 +6075,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -5602,7 +6124,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -5767,7 +6289,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5775,7 +6297,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -5795,7 +6317,7 @@ } ], "traits": { - "smithy.api#documentation": "

The HEAD action retrieves metadata from an object without returning the object\n itself. This action is useful if you're only interested in an object's metadata. To use\n HEAD, you must have READ access to the object.

\n\n

A HEAD request has the same options as a GET action on an\n object. The response is identical to the GET response except that there is no\n response body. Because of this, if the HEAD request generates an error, it\n returns a generic 404 Not Found or 403 Forbidden code. It is not \n possible to retrieve the exact exception beyond these error codes.

\n\n

If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the\n metadata from the object, you must use the following headers:

\n
    \n
  • \n

    x-amz-server-side-encryption-customer-algorithm

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key-MD5

    \n
  • \n
\n

For more information about SSE-C, see Server-Side Encryption (Using\n Customer-Provided Encryption Keys).

\n \n
    \n
  • \n

    Encryption request headers, like x-amz-server-side-encryption, should\n not be sent for GET requests if your object uses server-side encryption with KMS keys (SSE-KMS)\n or server-side encryption with Amazon S3–managed encryption keys\n (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400 BadRequest\n error.

    \n
  • \n
  • \n

    \n The last modified property in this case is the creation date of the object.

    \n
  • \n
\n
\n\n\n

Request headers are limited to 8 KB in size. For more information, see Common Request\n Headers.

\n

Consider the following when using request headers:

\n
    \n
  • \n

    Consideration 1 – If both of the If-Match and\n If-Unmodified-Since headers are present in the request as\n follows:

    \n
      \n
    • \n

      \n If-Match condition evaluates to true, and;

      \n
    • \n
    • \n

      \n If-Unmodified-Since condition evaluates to\n false;

      \n
    • \n
    \n

    Then Amazon S3 returns 200 OK and the data requested.

    \n
  • \n
  • \n

    Consideration 2 – If both of the If-None-Match and\n If-Modified-Since headers are present in the request as\n follows:

    \n
      \n
    • \n

      \n If-None-Match condition evaluates to false,\n and;

      \n
    • \n
    • \n

      \n If-Modified-Since condition evaluates to\n true;

      \n
    • \n
    \n

    Then Amazon S3 returns the 304 Not Modified response code.

    \n
  • \n
\n\n

For more information about conditional requests, see RFC 7232.

\n\n

\n Permissions\n

\n

You need the relevant read object (or version) permission for this operation. For more\n information, see Specifying Permissions\n in a Policy. If the object you request does not exist, the error Amazon S3 returns\n depends on whether you also have the s3:ListBucket permission.

\n
    \n
  • \n

    If you have the s3:ListBucket permission on the bucket, Amazon S3 returns\n an HTTP status code 404 (\"no such key\") error.

    \n
  • \n
  • \n

    If you don’t have the s3:ListBucket permission, Amazon S3 returns an HTTP\n status code 403 (\"access denied\") error.

    \n
  • \n
\n\n

The following action is related to HeadObject:

\n ", + "smithy.api#documentation": "

The HEAD action retrieves metadata from an object without returning the object\n itself. This action is useful if you're only interested in an object's metadata. To use\n HEAD, you must have READ access to the object.

\n\n

A HEAD request has the same options as a GET action on an\n object. The response is identical to the GET response except that there is no\n response body. Because of this, if the HEAD request generates an error, it\n returns a generic 404 Not Found or 403 Forbidden code. It is not \n possible to retrieve the exact exception beyond these error codes.

\n\n

If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the\n metadata from the object, you must use the following headers:

\n
    \n
  • \n

    x-amz-server-side-encryption-customer-algorithm

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key-MD5

    \n
  • \n
\n

For more information about SSE-C, see Server-Side Encryption (Using\n Customer-Provided Encryption Keys).

\n \n
    \n
  • \n

    Encryption request headers, like x-amz-server-side-encryption, should\n not be sent for GET requests if your object uses server-side encryption with KMS keys (SSE-KMS)\n or server-side encryption with Amazon S3–managed encryption keys\n (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400 BadRequest\n error.

    \n
  • \n
  • \n

    \n The last modified property in this case is the creation date of the object.

    \n
  • \n
\n
\n\n\n

Request headers are limited to 8 KB in size. For more information, see Common Request\n Headers.

\n

Consider the following when using request headers:

\n
    \n
  • \n

    Consideration 1 – If both of the If-Match and\n If-Unmodified-Since headers are present in the request as\n follows:

    \n
      \n
    • \n

      \n If-Match condition evaluates to true, and;

      \n
    • \n
    • \n

      \n If-Unmodified-Since condition evaluates to\n false;

      \n
    • \n
    \n

    Then Amazon S3 returns 200 OK and the data requested.

    \n
  • \n
  • \n

    Consideration 2 – If both of the If-None-Match and\n If-Modified-Since headers are present in the request as\n follows:

    \n
      \n
    • \n

      \n If-None-Match condition evaluates to false,\n and;

      \n
    • \n
    • \n

      \n If-Modified-Since condition evaluates to\n true;

      \n
    • \n
    \n

    Then Amazon S3 returns the 304 Not Modified response code.

    \n
  • \n
\n\n

For more information about conditional requests, see RFC 7232.

\n\n

\n Permissions\n

\n

You need the relevant read object (or version) permission for this operation. For more\n information, see Specifying Permissions\n in a Policy. If the object you request does not exist, the error Amazon S3 returns\n depends on whether you also have the s3:ListBucket permission.

\n
    \n
  • \n

    If you have the s3:ListBucket permission on the bucket, Amazon S3 returns\n an HTTP status code 404 (\"no such key\") error.

    \n
  • \n
  • \n

    If you don’t have the s3:ListBucket permission, Amazon S3 returns an HTTP\n status code 403 (\"access denied\") error.

    \n
  • \n
\n\n

The following actions are related to HeadObject:

\n ", "smithy.api#http": { "method": "HEAD", "uri": "/{Bucket}/{Key+}", @@ -5853,7 +6375,7 @@ "Expiration": { "target": "com.amazonaws.s3#Expiration", "traits": { - "smithy.api#documentation": "

If the object expiration is configured (see PUT Bucket lifecycle), the response includes\n this header. It includes the expiry-date and rule-id key-value pairs providing object\n expiration information. The value of the rule-id is URL encoded.

", + "smithy.api#documentation": "

If the object expiration is configured (see PUT Bucket lifecycle), the response includes\n this header. It includes the expiry-date and rule-id key-value\n pairs providing object expiration information. The value of the rule-id is\n URL-encoded.

", "smithy.api#httpHeader": "x-amz-expiration" } }, @@ -5885,10 +6407,38 @@ "smithy.api#httpHeader": "Content-Length" } }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32c" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha1" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha256" + } + }, "ETag": { "target": "com.amazonaws.s3#ETag", "traits": { - "smithy.api#documentation": "

An ETag is an opaque identifier assigned by a web server to a specific version of a\n resource found at a URL.

", + "smithy.api#documentation": "

An entity tag (ETag) is an opaque identifier assigned by a web server to a specific\n version of a resource found at a URL.

", "smithy.api#httpHeader": "ETag" } }, @@ -6013,14 +6563,14 @@ "ReplicationStatus": { "target": "com.amazonaws.s3#ReplicationStatus", "traits": { - "smithy.api#documentation": "

Amazon S3 can return this header if your request involves a bucket that is either a source or\n a destination in a replication rule.

\n\n

In replication, you have a source bucket on which you configure replication and\n destination bucket or buckets where Amazon S3 stores object replicas. When you request an object\n (GetObject) or object metadata (HeadObject) from these\n buckets, Amazon S3 will return the x-amz-replication-status header in the response\n as follows:

\n
    \n
  • \n

    If requesting an object from the source bucket — Amazon S3 will return the\n x-amz-replication-status header if the object in your request is\n eligible for replication.

    \n

    For example, suppose that in your replication configuration, you specify object\n prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix\n TaxDocs. Any objects you upload with this key name prefix, for\n example TaxDocs/document1.pdf, are eligible for replication. For any\n object request with this key name prefix, Amazon S3 will return the\n x-amz-replication-status header with value PENDING, COMPLETED or\n FAILED indicating object replication status.

    \n
  • \n
  • \n

    If requesting an object from a destination bucket — Amazon S3 will return the\n x-amz-replication-status header with value REPLICA if the object in\n your request is a replica that Amazon S3 created and there is no replica modification\n replication in progress.

    \n
  • \n
  • \n

    When replicating objects to multiple destination buckets the\n x-amz-replication-status header acts differently. The header of the\n source object will only return a value of COMPLETED when replication is successful to\n all destinations. The header will remain at value PENDING until replication has\n completed for all destinations. If one or more destinations fails replication the\n header will return FAILED.

    \n
  • \n
\n\n

For more information, see Replication.

", + "smithy.api#documentation": "

Amazon S3 can return this header if your request involves a bucket that is either a source or\n a destination in a replication rule.

\n\n

In replication, you have a source bucket on which you configure replication and\n destination bucket or buckets where Amazon S3 stores object replicas. When you request an object\n (GetObject) or object metadata (HeadObject) from these\n buckets, Amazon S3 will return the x-amz-replication-status header in the response\n as follows:

\n
    \n
  • \n

    \n If requesting an object from the source bucket, Amazon S3 will return the\n x-amz-replication-status header if the object in your request is\n eligible for replication.

    \n

    For example, suppose that in your replication configuration, you specify object\n prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix\n TaxDocs. Any objects you upload with this key name prefix, for\n example TaxDocs/document1.pdf, are eligible for replication. For any\n object request with this key name prefix, Amazon S3 will return the\n x-amz-replication-status header with value PENDING, COMPLETED or\n FAILED indicating object replication status.

    \n
  • \n
  • \n

    \n If requesting an object from a destination bucket, Amazon S3 will return the\n x-amz-replication-status header with value REPLICA if the object in\n your request is a replica that Amazon S3 created and there is no replica modification\n replication in progress.

    \n
  • \n
  • \n

    \n When replicating objects to multiple destination buckets, the\n x-amz-replication-status header acts differently. The header of the\n source object will only return a value of COMPLETED when replication is successful to\n all destinations. The header will remain at value PENDING until replication has\n completed for all destinations. If one or more destinations fails replication the\n header will return FAILED.

    \n
  • \n
\n\n

For more information, see Replication.

", "smithy.api#httpHeader": "x-amz-replication-status" } }, "PartsCount": { "target": "com.amazonaws.s3#PartsCount", "traits": { - "smithy.api#documentation": "

The count of parts this object has.

", + "smithy.api#documentation": "

The count of parts this object has. This value is only returned if you specify partNumber\n in your request and the object was uploaded as a multipart upload.

", "smithy.api#httpHeader": "x-amz-mp-parts-count" } }, @@ -6053,7 +6603,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The name of the bucket containing the object.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The name of the bucket containing the object.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6061,28 +6611,28 @@ "IfMatch": { "target": "com.amazonaws.s3#IfMatch", "traits": { - "smithy.api#documentation": "

Return the object only if its entity tag (ETag) is the same as the one specified,\n otherwise return a 412 (precondition failed).

", + "smithy.api#documentation": "

Return the object only if its entity tag (ETag) is the same as the one specified;\n otherwise, return a 412 (precondition failed) error.

", "smithy.api#httpHeader": "If-Match" } }, "IfModifiedSince": { "target": "com.amazonaws.s3#IfModifiedSince", "traits": { - "smithy.api#documentation": "

Return the object only if it has been modified since the specified time, otherwise\n return a 304 (not modified).

", + "smithy.api#documentation": "

Return the object only if it has been modified since the specified time; otherwise,\n return a 304 (not modified) error.

", "smithy.api#httpHeader": "If-Modified-Since" } }, "IfNoneMatch": { "target": "com.amazonaws.s3#IfNoneMatch", "traits": { - "smithy.api#documentation": "

Return the object only if its entity tag (ETag) is different from the one specified,\n otherwise return a 304 (not modified).

", + "smithy.api#documentation": "

Return the object only if its entity tag (ETag) is different from the one specified;\n otherwise, return a 304 (not modified) error.

", "smithy.api#httpHeader": "If-None-Match" } }, "IfUnmodifiedSince": { "target": "com.amazonaws.s3#IfUnmodifiedSince", "traits": { - "smithy.api#documentation": "

Return the object only if it has not been modified since the specified time, otherwise\n return a 412 (precondition failed).

", + "smithy.api#documentation": "

Return the object only if it has not been modified since the specified time; otherwise,\n return a 412 (precondition failed) error.

", "smithy.api#httpHeader": "If-Unmodified-Since" } }, @@ -6145,9 +6695,16 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } + }, + "ChecksumMode": { + "target": "com.amazonaws.s3#ChecksumMode", + "traits": { + "smithy.api#documentation": "

To retrieve the checksum, this parameter must be enabled.

\n

In addition, if you enable ChecksumMode and the object is encrypted with\n Amazon Web Services Key Management Service (Amazon Web Services KMS), you must have permission to use the\n kms:Decrypt action for the request to succeed.

", + "smithy.api#httpHeader": "x-amz-checksum-mode" + } } } }, @@ -6600,6 +7157,10 @@ { "value": "BucketKeyStatus", "name": "BucketKeyStatus" + }, + { + "value": "ChecksumAlgorithm", + "name": "ChecksumAlgorithm" } ] } @@ -6829,7 +7390,7 @@ "Filter": { "target": "com.amazonaws.s3#LifecycleRuleFilter", "traits": { - "smithy.api#documentation": "

The Filter is used to identify objects that a Lifecycle Rule applies to. A\n Filter must have exactly one of Prefix, Tag, or\n And specified. Filter is required if the LifecycleRule\n does not containt a Prefix element.

" + "smithy.api#documentation": "

The Filter is used to identify objects that a Lifecycle Rule applies to. A\n Filter must have exactly one of Prefix, Tag, or\n And specified. Filter is required if the\n LifecycleRule does not contain a Prefix element.

" } }, "Status": { @@ -7013,7 +7574,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -7042,13 +7603,13 @@ "IsTruncated": { "target": "com.amazonaws.s3#IsTruncated", "traits": { - "smithy.api#documentation": "

Indicates whether the returned list of analytics configurations is complete. A value of\n true indicates that the list is not complete and the NextContinuationToken will be provided\n for a subsequent request.

" + "smithy.api#documentation": "

Indicates whether the returned list of analytics configurations is complete. A value of\n true indicates that the list is not complete and the\n NextContinuationToken will be provided for a subsequent request.

" } }, "ContinuationToken": { "target": "com.amazonaws.s3#Token", "traits": { - "smithy.api#documentation": "

The ContinuationToken that represents a placeholder from where this request should\n begin.

" + "smithy.api#documentation": "

The ContinuationToken that represents a placeholder from where this request\n should begin.

" } }, "NextContinuationToken": { @@ -7081,7 +7642,7 @@ "ContinuationToken": { "target": "com.amazonaws.s3#Token", "traits": { - "smithy.api#documentation": "

The ContinuationToken that represents a placeholder from where this request should\n begin.

", + "smithy.api#documentation": "

The ContinuationToken that represents a placeholder from where this request\n should begin.

", "smithy.api#httpQuery": "continuation-token" } } @@ -7159,7 +7720,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -7237,7 +7798,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -7249,7 +7810,7 @@ "target": "com.amazonaws.s3#ListBucketsOutput" }, "traits": { - "smithy.api#documentation": "

Returns a list of all buckets owned by the authenticated sender of the request.

", + "smithy.api#documentation": "

Returns a list of all buckets owned by the authenticated sender of the request. To use\n this operation, you must have the s3:ListAllMyBuckets permission.

", "smithy.api#http": { "method": "GET", "uri": "/", @@ -7263,7 +7824,7 @@ "Buckets": { "target": "com.amazonaws.s3#Buckets", "traits": { - "smithy.api#documentation": "

The list of buckets owned by the requestor.

" + "smithy.api#documentation": "

The list of buckets owned by the requester.

" } }, "Owner": { @@ -7383,7 +7944,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7432,7 +7993,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -7601,7 +8162,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -7705,7 +8266,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The name of the bucket containing the objects.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The name of the bucket containing the objects.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7754,7 +8315,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -7806,7 +8367,7 @@ "Name": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

" + "smithy.api#documentation": "

The bucket name.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

" } }, "Prefix": { @@ -7875,7 +8436,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

Bucket name to list.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

Bucket name to list.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7939,7 +8500,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -7954,7 +8515,7 @@ "target": "com.amazonaws.s3#ListPartsOutput" }, "traits": { - "smithy.api#documentation": "

Lists the parts that have been uploaded for a specific multipart upload. This operation\n must include the upload ID, which you obtain by sending the initiate multipart upload\n request (see CreateMultipartUpload).\n This request returns a maximum of 1,000 uploaded parts. The default number of parts\n returned is 1,000 parts. You can restrict the number of parts returned by specifying the\n max-parts request parameter. If your multipart upload consists of more than\n 1,000 parts, the response returns an IsTruncated field with the value of true,\n and a NextPartNumberMarker element. In subsequent ListParts\n requests you can include the part-number-marker query string parameter and set its value to\n the NextPartNumberMarker field value from the previous response.

\n\n

For more information on multipart uploads, see Uploading Objects Using Multipart\n Upload.

\n\n

For information on permissions required to use the multipart upload API, see Multipart Upload and\n Permissions.

\n\n

The following operations are related to ListParts:

\n ", + "smithy.api#documentation": "

Lists the parts that have been uploaded for a specific multipart upload. This operation\n must include the upload ID, which you obtain by sending the initiate multipart upload\n request (see CreateMultipartUpload).\n This request returns a maximum of 1,000 uploaded parts. The default number of parts\n returned is 1,000 parts. You can restrict the number of parts returned by specifying the\n max-parts request parameter. If your multipart upload consists of more than\n 1,000 parts, the response returns an IsTruncated field with the value of true,\n and a NextPartNumberMarker element. In subsequent ListParts\n requests you can include the part-number-marker query string parameter and set its value to\n the NextPartNumberMarker field value from the previous response.

\n

If the upload was created using a checksum algorithm, you will need to have permission\n to the kms:Decrypt action for the request to succeed.\n

\n\n

For more information on multipart uploads, see Uploading Objects Using Multipart\n Upload.

\n\n

For information on permissions required to use the multipart upload API, see Multipart Upload and\n Permissions.

\n\n

The following operations are related to ListParts:

\n ", "smithy.api#http": { "method": "GET", "uri": "/{Bucket}/{Key+}?x-id=ListParts", @@ -8058,6 +8619,12 @@ "traits": { "smithy.api#httpHeader": "x-amz-request-charged" } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

The algorithm that was used to create a checksum of the object.

" + } } }, "traits": { @@ -8070,7 +8637,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The name of the bucket to which the parts are being uploaded.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The name of the bucket to which the parts are being uploaded.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8114,9 +8681,30 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } + }, + "SSECustomerAlgorithm": { + "target": "com.amazonaws.s3#SSECustomerAlgorithm", + "traits": { + "smithy.api#documentation": "

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created \n using a checksum algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" + } + }, + "SSECustomerKey": { + "target": "com.amazonaws.s3#SSECustomerKey", + "traits": { + "smithy.api#documentation": "

The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. \n For more information, see\n Protecting data using SSE-C keys in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key" + } + }, + "SSECustomerKeyMD5": { + "target": "com.amazonaws.s3#SSECustomerKeyMD5", + "traits": { + "smithy.api#documentation": "

The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum \n algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" + } } } }, @@ -8296,7 +8884,7 @@ "AccessPointArn": { "target": "com.amazonaws.s3#AccessPointArn", "traits": { - "smithy.api#documentation": "

The access point ARN used when evaluating an AND predicate.

" + "smithy.api#documentation": "

The access point ARN used when evaluating an AND predicate.

" } } }, @@ -8425,6 +9013,12 @@ "traits": { "smithy.api#documentation": "

Identifies who initiated the multipart upload.

" } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

The algorithm that was used to create a checksum of the object.

" + } } }, "traits": { @@ -8488,7 +9082,7 @@ "NoncurrentDays": { "target": "com.amazonaws.s3#Days", "traits": { - "smithy.api#documentation": "

Specifies the number of days an object is noncurrent before Amazon S3 can perform the\n associated action. For information about the noncurrent days calculations, see How\n Amazon S3 Calculates When an Object Became Noncurrent in the Amazon S3 User Guide.

" + "smithy.api#documentation": "

Specifies the number of days an object is noncurrent before Amazon S3 can perform the\n associated action. The value must be a non-zero positive integer. For information about the noncurrent days calculations, see How\n Amazon S3 Calculates When an Object Became Noncurrent in the Amazon S3 User Guide.

" } }, "NewerNoncurrentVersions": { @@ -8615,10 +9209,17 @@ "smithy.api#documentation": "

Creation date of the object.

" } }, - "ETag": { - "target": "com.amazonaws.s3#ETag", + "ETag": { + "target": "com.amazonaws.s3#ETag", + "traits": { + "smithy.api#documentation": "

The entity tag is a hash of the object. The ETag reflects changes only to the contents\n of an object, not its metadata. The ETag may or may not be an MD5 digest of the object\n data. Whether or not it is depends on how the object was created and how it is encrypted as\n described below:

\n
    \n
  • \n

    Objects created by the PUT Object, POST Object, or Copy operation, or through the\n Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are\n an MD5 digest of their object data.

    \n
  • \n
  • \n

    Objects created by the PUT Object, POST Object, or Copy operation, or through the\n Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are\n not an MD5 digest of their object data.

    \n
  • \n
  • \n

    If an object is created by either the Multipart Upload or Part Copy operation, the\n ETag is not an MD5 digest, regardless of the method of encryption. If an object\n is larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a\n Multipart Upload, and therefore the ETag will not be an MD5 digest.

    \n
  • \n
" + } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithmList", "traits": { - "smithy.api#documentation": "

The entity tag is a hash of the object. The ETag reflects changes only to the contents\n of an object, not its metadata. The ETag may or may not be an MD5 digest of the object\n data. Whether or not it is depends on how the object was created and how it is encrypted as\n described below:

\n
    \n
  • \n

    Objects created by the PUT Object, POST Object, or Copy operation, or through the\n Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are\n an MD5 digest of their object data.

    \n
  • \n
  • \n

    Objects created by the PUT Object, POST Object, or Copy operation, or through the\n Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are\n not an MD5 digest of their object data.

    \n
  • \n
  • \n

    If an object is created by either the Multipart Upload or Part Copy operation, the\n ETag is not an MD5 digest, regardless of the method of encryption.

    \n
  • \n
" + "smithy.api#documentation": "

The algorithm that was used to create a checksum of the object.

", + "smithy.api#xmlFlattened": {} } }, "Size": { @@ -8652,6 +9253,39 @@ "smithy.api#error": "client" } }, + "com.amazonaws.s3#ObjectAttributes": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ETag", + "name": "ETAG" + }, + { + "value": "Checksum", + "name": "CHECKSUM" + }, + { + "value": "ObjectParts", + "name": "OBJECT_PARTS" + }, + { + "value": "StorageClass", + "name": "STORAGE_CLASS" + }, + { + "value": "ObjectSize", + "name": "OBJECT_SIZE" + } + ] + } + }, + "com.amazonaws.s3#ObjectAttributesList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ObjectAttributes" + } + }, "com.amazonaws.s3#ObjectCannedACL": { "type": "string", "traits": { @@ -8768,12 +9402,12 @@ "Status": { "target": "com.amazonaws.s3#ObjectLockLegalHoldStatus", "traits": { - "smithy.api#documentation": "

Indicates whether the specified object has a Legal Hold in place.

" + "smithy.api#documentation": "

Indicates whether the specified object has a legal hold in place.

" } } }, "traits": { - "smithy.api#documentation": "

A Legal Hold configuration for an object.

" + "smithy.api#documentation": "

A legal hold configuration for an object.

" } }, "com.amazonaws.s3#ObjectLockLegalHoldStatus": { @@ -8892,6 +9526,53 @@ ] } }, + "com.amazonaws.s3#ObjectPart": { + "type": "structure", + "members": { + "PartNumber": { + "target": "com.amazonaws.s3#PartNumber", + "traits": { + "smithy.api#documentation": "

The part number identifying the part. This value is a positive integer between 1 and\n 10,000.

" + } + }, + "Size": { + "target": "com.amazonaws.s3#Size", + "traits": { + "smithy.api#documentation": "

The size of the uploaded part in bytes.

" + } + }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container for elements related to an individual part.

" + } + }, + "com.amazonaws.s3#ObjectSize": { + "type": "long" + }, "com.amazonaws.s3#ObjectSizeGreaterThanBytes": { "type": "long" }, @@ -8950,6 +9631,13 @@ "smithy.api#documentation": "

The entity tag is an MD5 hash of that version of the object.

" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithmList", + "traits": { + "smithy.api#documentation": "

The algorithm that was used to create a checksum of the object.

", + "smithy.api#xmlFlattened": {} + } + }, "Size": { "target": "com.amazonaws.s3#Size", "traits": { @@ -9152,6 +9840,30 @@ "traits": { "smithy.api#documentation": "

Size in bytes of the uploaded part data.

" } + }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

" + } } }, "traits": { @@ -9173,6 +9885,12 @@ "com.amazonaws.s3#PartsCount": { "type": "integer" }, + "com.amazonaws.s3#PartsList": { + "type": "list", + "member": { + "target": "com.amazonaws.s3#ObjectPart" + } + }, "com.amazonaws.s3#Payer": { "type": "string", "traits": { @@ -9301,7 +10019,7 @@ "BlockPublicAcls": { "target": "com.amazonaws.s3#Setting", "traits": { - "smithy.api#documentation": "

Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket\n and objects in this bucket. Setting this element to TRUE causes the following\n behavior:

\n
    \n
  • \n

    PUT Bucket acl and PUT Object acl calls fail if the specified ACL is\n public.

    \n
  • \n
  • \n

    PUT Object calls fail if the request includes a public ACL.

    \n
  • \n
  • \n

    PUT Bucket calls fail if the request includes a public ACL.

    \n
  • \n
\n

Enabling this setting doesn't affect existing policies or ACLs.

", + "smithy.api#documentation": "

Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket\n and objects in this bucket. Setting this element to TRUE causes the following\n behavior:

\n
    \n
  • \n

    PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is\n public.

    \n
  • \n
  • \n

    PUT Object calls fail if the request includes a public ACL.

    \n
  • \n
  • \n

    PUT Bucket calls fail if the request includes a public ACL.

    \n
  • \n
\n

Enabling this setting doesn't affect existing policies or ACLs.

", "smithy.api#xmlName": "BlockPublicAcls" } }, @@ -9337,7 +10055,10 @@ "target": "com.amazonaws.s3#PutBucketAccelerateConfigurationRequest" }, "traits": { - "smithy.api#documentation": "

Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration is a\n bucket-level feature that enables you to perform faster data transfers to Amazon S3.

\n\n

To use this operation, you must have permission to perform the\n s3:PutAccelerateConfiguration action. The bucket owner has this permission by default. The\n bucket owner can grant this permission to others. For more information about permissions,\n see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3\n Resources.

\n\n

The Transfer Acceleration state of a bucket can be set to one of the following two\n values:

\n
    \n
  • \n

    Enabled – Enables accelerated data transfers to the bucket.

    \n
  • \n
  • \n

    Suspended – Disables accelerated data transfers to the bucket.

    \n
  • \n
\n\n\n

The GetBucketAccelerateConfiguration action returns the transfer acceleration\n state of a bucket.

\n\n

After setting the Transfer Acceleration state of a bucket to Enabled, it might take up\n to thirty minutes before the data transfer rates to the bucket increase.

\n\n

The name of the bucket used for Transfer Acceleration must be DNS-compliant and must\n not contain periods (\".\").

\n\n

For more information about transfer acceleration, see Transfer Acceleration.

\n\n

The following operations are related to\n PutBucketAccelerateConfiguration:

\n ", + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "

Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration is a\n bucket-level feature that enables you to perform faster data transfers to Amazon S3.

\n\n

To use this operation, you must have permission to perform the\n s3:PutAccelerateConfiguration action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing\n Access Permissions to Your Amazon S3 Resources.

\n\n

The Transfer Acceleration state of a bucket can be set to one of the following two\n values:

\n
    \n
  • \n

    Enabled – Enables accelerated data transfers to the bucket.

    \n
  • \n
  • \n

    Suspended – Disables accelerated data transfers to the bucket.

    \n
  • \n
\n\n\n

The GetBucketAccelerateConfiguration action returns the transfer acceleration\n state of a bucket.

\n\n

After setting the Transfer Acceleration state of a bucket to Enabled, it might take up\n to thirty minutes before the data transfer rates to the bucket increase.

\n\n

The name of the bucket used for Transfer Acceleration must be DNS-compliant and must\n not contain periods (\".\").

\n\n

For more information about transfer acceleration, see Transfer Acceleration.

\n\n

The following operations are related to\n PutBucketAccelerateConfiguration:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?accelerate", @@ -9368,9 +10089,16 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } + }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } } } }, @@ -9380,13 +10108,16 @@ "target": "com.amazonaws.s3#PutBucketAclRequest" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Sets the permissions on an existing bucket using access control lists (ACL). For more\n information, see Using ACLs. To set\n the ACL of a bucket, you must have WRITE_ACP permission.

\n\n

You can use one of the following two ways to set a bucket's permissions:

\n
    \n
  • \n

    Specify the ACL in the request body

    \n
  • \n
  • \n

    Specify permissions using request headers

    \n
  • \n
\n\n \n

You cannot specify access permission using both the body and the request\n headers.

\n
\n\n

Depending on your application needs, you may choose to set the ACL on a bucket using\n either the request body or the headers. For example, if you have an existing application\n that updates a bucket ACL using the request body, then you can continue to use that\n approach.

\n\n \n

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. \n You must use policies to grant access to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and \n return the AccessControlListNotSupported error code. Requests to read ACLs are still supported.\n For more information, see Controlling object ownership\n in the Amazon S3 User Guide.

\n
\n

\n Access Permissions\n

\n

You can set access permissions using one of the following methods:

\n
    \n
  • \n

    Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports\n a set of predefined ACLs, known as canned ACLs. Each canned ACL\n has a predefined set of grantees and permissions. Specify the canned ACL name as the\n value of x-amz-acl. If you use this header, you cannot use other access\n control-specific headers in your request. For more information, see Canned ACL.

    \n
  • \n
  • \n

    Specify access permissions explicitly with the x-amz-grant-read,\n x-amz-grant-read-acp, x-amz-grant-write-acp, and\n x-amz-grant-full-control headers. When using these headers, you\n specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 groups) who\n will receive the permission. If you use these ACL-specific headers, you cannot use\n the x-amz-acl header to set a canned ACL. These parameters map to the\n set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL)\n Overview.

    \n

    You specify each grantee as a type=value pair, where the type is one of the\n following:

    \n
      \n
    • \n

      \n id – if the value specified is the canonical user ID of an Amazon Web Services account

      \n
    • \n
    • \n

      \n uri – if you are granting permissions to a predefined\n group

      \n
    • \n
    • \n

      \n emailAddress – if the value specified is the email address of\n an Amazon Web Services account

      \n \n

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      \n
        \n
      • \n

        US East (N. Virginia)

        \n
      • \n
      • \n

        US West (N. California)

        \n
      • \n
      • \n

        US West (Oregon)

        \n
      • \n
      • \n

        Asia Pacific (Singapore)

        \n
      • \n
      • \n

        Asia Pacific (Sydney)

        \n
      • \n
      • \n

        Asia Pacific (Tokyo)

        \n
      • \n
      • \n

        Europe (Ireland)

        \n
      • \n
      • \n

        South America (São Paulo)

        \n
      • \n
      \n

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      \n
      \n
    • \n
    \n

    For example, the following x-amz-grant-write header grants create,\n overwrite, and delete objects permission to LogDelivery group predefined by Amazon S3 and\n two Amazon Web Services accounts identified by their email addresses.

    \n

    \n x-amz-grant-write: uri=\"http://acs.amazonaws.com/groups/s3/LogDelivery\",\n id=\"111122223333\", id=\"555566667777\" \n

    \n\n
  • \n
\n

You can use either a canned ACL or specify access permissions explicitly. You cannot do\n both.

\n

\n Grantee Values\n

\n

You can specify the person (grantee) to whom you're assigning access rights (using\n request elements) in the following ways:

\n
    \n
  • \n

    By the person's ID:

    \n

    \n <>ID<><>GranteesEmail<>\n \n

    \n

    DisplayName is optional and ignored in the request

    \n
  • \n
  • \n

    By URI:

    \n

    \n <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>\n

    \n
  • \n
  • \n

    By Email address:

    \n

    \n <>Grantees@email.com<>lt;/Grantee>\n

    \n

    The grantee is resolved to the CanonicalUser and, in a response to a GET Object\n acl request, appears as the CanonicalUser.

    \n \n

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    \n
      \n
    • \n

      US East (N. Virginia)

      \n
    • \n
    • \n

      US West (N. California)

      \n
    • \n
    • \n

      US West (Oregon)

      \n
    • \n
    • \n

      Asia Pacific (Singapore)

      \n
    • \n
    • \n

      Asia Pacific (Sydney)

      \n
    • \n
    • \n

      Asia Pacific (Tokyo)

      \n
    • \n
    • \n

      Europe (Ireland)

      \n
    • \n
    • \n

      South America (São Paulo)

      \n
    • \n
    \n

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    \n
    \n
  • \n
\n\n\n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?acl", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketAclRequest": { @@ -9422,6 +10153,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "GrantFullControl": { "target": "com.amazonaws.s3#GrantFullControl", "traits": { @@ -9460,7 +10198,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -9511,7 +10249,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -9523,13 +10261,16 @@ "target": "com.amazonaws.s3#PutBucketCorsRequest" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Sets the cors configuration for your bucket. If the configuration exists,\n Amazon S3 replaces it.

\n

To use this operation, you must be allowed to perform the s3:PutBucketCORS\n action. By default, the bucket owner has this permission and can grant it to others.

\n

You set this configuration on a bucket so that the bucket can service cross-origin\n requests. For example, you might want to enable a request whose origin is\n http://www.example.com to access your Amazon S3 bucket at\n my.example.bucket.com by using the browser's XMLHttpRequest\n capability.

\n

To enable cross-origin resource sharing (CORS) on a bucket, you add the\n cors subresource to the bucket. The cors subresource is an XML\n document in which you configure rules that identify origins and the HTTP methods that can\n be executed on your bucket. The document is limited to 64 KB in size.

\n

When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a\n bucket, it evaluates the cors configuration on the bucket and uses the first\n CORSRule rule that matches the incoming browser request to enable a\n cross-origin request. For a rule to match, the following conditions must be met:

\n
    \n
  • \n

    The request's Origin header must match AllowedOrigin\n elements.

    \n
  • \n
  • \n

    The request method (for example, GET, PUT, HEAD, and so on) or the\n Access-Control-Request-Method header in case of a pre-flight\n OPTIONS request must be one of the AllowedMethod\n elements.

    \n
  • \n
  • \n

    Every header specified in the Access-Control-Request-Headers request\n header of a pre-flight request must match an AllowedHeader element.\n

    \n
  • \n
\n

For more information about CORS, go to Enabling\n Cross-Origin Resource Sharing in the Amazon S3 User Guide.

\n \n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?cors", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketCorsRequest": { @@ -9559,10 +10300,17 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -9574,13 +10322,16 @@ "target": "com.amazonaws.s3#PutBucketEncryptionRequest" }, "traits": { - "smithy.api#documentation": "

This action uses the encryption subresource to configure default\n encryption and Amazon S3 Bucket Key for an existing bucket.

\n

Default encryption for a bucket can use server-side encryption with Amazon S3-managed keys\n (SSE-S3) or customer managed keys (SSE-KMS). If you specify default encryption\n using SSE-KMS, you can also configure Amazon S3 Bucket Key. For information about default\n encryption, see Amazon S3 default bucket encryption\n in the Amazon S3 User Guide. For more information about S3 Bucket Keys,\n see Amazon S3 Bucket Keys in the Amazon S3 User Guide.

\n \n

This action requires Amazon Web Services Signature Version 4. For more information, see Authenticating Requests (Amazon Web Services Signature\n Version 4).

\n
\n

To use this operation, you must have permissions to perform the\n s3:PutEncryptionConfiguration action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3\n Resources in the Amazon S3 User Guide.

\n \n

\n Related Resources\n

\n ", + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

This action uses the encryption subresource to configure default\n encryption and Amazon S3 Bucket Key for an existing bucket.

\n

Default encryption for a bucket can use server-side encryption with Amazon S3-managed keys\n (SSE-S3) or customer managed keys (SSE-KMS). If you specify default encryption\n using SSE-KMS, you can also configure Amazon S3 Bucket Key. When the default encryption is SSE-KMS, if\n you upload an object to the bucket and do not specify the KMS key to use for encryption, Amazon S3\n uses the default Amazon Web Services managed KMS key for your account. For information about default\n encryption, see Amazon S3 default bucket encryption\n in the Amazon S3 User Guide. For more information about S3 Bucket Keys,\n see Amazon S3 Bucket Keys in the Amazon S3 User Guide.

\n \n

This action requires Amazon Web Services Signature Version 4. For more information, see Authenticating Requests (Amazon Web Services Signature\n Version 4).

\n
\n

To use this operation, you must have permissions to perform the\n s3:PutEncryptionConfiguration action. The bucket owner has this permission\n by default. The bucket owner can grant this permission to others. For more information\n about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3\n Resources in the Amazon S3 User Guide.

\n \n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?encryption", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketEncryptionRequest": { @@ -9601,6 +10352,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "ServerSideEncryptionConfiguration": { "target": "com.amazonaws.s3#ServerSideEncryptionConfiguration", "traits": { @@ -9612,7 +10370,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -9707,7 +10465,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -9719,13 +10477,16 @@ "target": "com.amazonaws.s3#PutBucketLifecycleConfigurationRequest" }, "traits": { - "smithy.api#documentation": "

Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle\n configuration. For information about lifecycle configuration, see Managing your storage\n lifecycle.

\n\n \n

Bucket lifecycle configuration now supports specifying a lifecycle rule using an\n object key name prefix, one or more object tags, or a combination of both. Accordingly,\n this section describes the latest API. The previous version of the API supported\n filtering based only on an object key name prefix, which is supported for backward\n compatibility. For the related API description, see PutBucketLifecycle.

\n
\n\n \n\n

\n Rules\n

\n

You specify the lifecycle configuration in your request body. The lifecycle\n configuration is specified as XML consisting of one or more rules. Each rule consists of\n the following:

\n\n
    \n
  • \n

    Filter identifying a subset of objects to which the rule applies. The filter can\n be based on a key name prefix, object tags, or a combination of both.

    \n
  • \n
  • \n

    Status whether the rule is in effect.

    \n
  • \n
  • \n

    One or more lifecycle transition and expiration actions that you want Amazon S3 to\n perform on the objects identified by the filter. If the state of your bucket is\n versioning-enabled or versioning-suspended, you can have many versions of the same\n object (one current version and zero or more noncurrent versions). Amazon S3 provides\n predefined actions that you can specify for current and noncurrent object\n versions.

    \n
  • \n
\n\n

For more information, see Object\n Lifecycle Management and Lifecycle Configuration Elements.

\n\n\n

\n Permissions\n

\n\n\n

By default, all Amazon S3 resources are private, including buckets, objects, and related\n subresources (for example, lifecycle configuration and website configuration). Only the\n resource owner (that is, the Amazon Web Services account that created it) can access the resource. The\n resource owner can optionally grant access permissions to others by writing an access\n policy. For this operation, a user must get the s3:PutLifecycleConfiguration\n permission.

\n\n

You can also explicitly deny permissions. Explicit deny also supersedes any other\n permissions. If you want to block users or accounts from removing or deleting objects from\n your bucket, you must deny them permissions for the following actions:

\n\n
    \n
  • \n

    s3:DeleteObject

    \n
  • \n
  • \n

    s3:DeleteObjectVersion

    \n
  • \n
  • \n

    s3:PutLifecycleConfiguration

    \n
  • \n
\n\n\n

For more information about permissions, see Managing Access Permissions to Your Amazon S3\n Resources.

\n\n

The following are related to PutBucketLifecycleConfiguration:

\n ", + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle\n configuration. Keep in mind that this will overwrite an existing lifecycle configuration, so if\n you want to retain any configuration details, they must be included in the new lifecycle\n configuration. For information about lifecycle configuration, see Managing your storage\n lifecycle.

\n\n \n

Bucket lifecycle configuration now supports specifying a lifecycle rule using an\n object key name prefix, one or more object tags, or a combination of both. Accordingly,\n this section describes the latest API. The previous version of the API supported\n filtering based only on an object key name prefix, which is supported for backward\n compatibility. For the related API description, see PutBucketLifecycle.

\n
\n\n \n\n

\n Rules\n

\n

You specify the lifecycle configuration in your request body. The lifecycle\n configuration is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle\n configuration can have up to 1,000 rules. This limit is not adjustable. Each rule consists\n of the following:

\n\n
    \n
  • \n

    Filter identifying a subset of objects to which the rule applies. The filter can\n be based on a key name prefix, object tags, or a combination of both.

    \n
  • \n
  • \n

    Status whether the rule is in effect.

    \n
  • \n
  • \n

    One or more lifecycle transition and expiration actions that you want Amazon S3 to\n perform on the objects identified by the filter. If the state of your bucket is\n versioning-enabled or versioning-suspended, you can have many versions of the same\n object (one current version and zero or more noncurrent versions). Amazon S3 provides\n predefined actions that you can specify for current and noncurrent object\n versions.

    \n
  • \n
\n\n

For more information, see Object\n Lifecycle Management and Lifecycle Configuration Elements.

\n\n\n

\n Permissions\n

\n\n\n

By default, all Amazon S3 resources are private, including buckets, objects, and related\n subresources (for example, lifecycle configuration and website configuration). Only the\n resource owner (that is, the Amazon Web Services account that created it) can access the resource. The\n resource owner can optionally grant access permissions to others by writing an access\n policy. For this operation, a user must get the s3:PutLifecycleConfiguration\n permission.

\n\n

You can also explicitly deny permissions. Explicit deny also supersedes any other\n permissions. If you want to block users or accounts from removing or deleting objects from\n your bucket, you must deny them permissions for the following actions:

\n\n
    \n
  • \n

    \n s3:DeleteObject\n

    \n
  • \n
  • \n

    \n s3:DeleteObjectVersion\n

    \n
  • \n
  • \n

    \n s3:PutLifecycleConfiguration\n

    \n
  • \n
\n\n\n

For more information about permissions, see Managing Access Permissions to Your Amazon S3\n Resources.

\n\n

The following are related to PutBucketLifecycleConfiguration:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?lifecycle", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketLifecycleConfigurationRequest": { @@ -9739,6 +10500,13 @@ "smithy.api#required": {} } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "LifecycleConfiguration": { "target": "com.amazonaws.s3#BucketLifecycleConfiguration", "traits": { @@ -9750,7 +10518,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -9762,13 +10530,16 @@ "target": "com.amazonaws.s3#PutBucketLoggingRequest" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Set the logging parameters for a bucket and to specify permissions for who can view and\n modify the logging parameters. All logs are saved to buckets in the same Amazon Web Services Region as the\n source bucket. To set the logging status of a bucket, you must be the bucket owner.

\n\n

The bucket owner is automatically granted FULL_CONTROL to all logs. You use the Grantee request element to grant access to other people. The\n Permissions request element specifies the kind of access the grantee has to\n the logs.

\n \n

If the target bucket for log delivery uses the bucket owner enforced\n setting for S3 Object Ownership, you can't use the Grantee request element\n to grant access to others. Permissions can only be granted using policies. For more information, see Permissions for server access log delivery in the\n Amazon S3 User Guide.

\n
\n\n

\n Grantee Values\n

\n

You can specify the person (grantee) to whom you're assigning access rights (using\n request elements) in the following ways:

\n\n
    \n
  • \n

    By the person's ID:

    \n

    \n <>ID<><>GranteesEmail<>\n \n

    \n

    DisplayName is optional and ignored in the request.

    \n
  • \n
  • \n

    By Email address:

    \n

    \n <>Grantees@email.com<>\n

    \n

    The grantee is resolved to the CanonicalUser and, in a response to a GET Object\n acl request, appears as the CanonicalUser.

    \n
  • \n
  • \n

    By URI:

    \n

    \n <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>\n

    \n
  • \n
\n\n\n

To enable logging, you use LoggingEnabled and its children request elements. To disable\n logging, you use an empty BucketLoggingStatus request element:

\n\n

\n \n

\n\n

For more information about server access logging, see Server Access Logging in the Amazon S3 User Guide.

\n\n

For more information about creating a bucket, see CreateBucket. For more\n information about returning the logging status of a bucket, see GetBucketLogging.

\n\n

The following operations are related to PutBucketLogging:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?logging", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketLoggingRequest": { @@ -9798,10 +10569,17 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -9852,7 +10630,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -9864,7 +10642,7 @@ "target": "com.amazonaws.s3#PutBucketNotificationConfigurationRequest" }, "traits": { - "smithy.api#documentation": "

Enables notifications of specified events for a bucket. For more information about event\n notifications, see Configuring Event\n Notifications.

\n\n

Using this API, you can replace an existing notification configuration. The\n configuration is an XML file that defines the event types that you want Amazon S3 to publish and\n the destination where you want Amazon S3 to publish an event notification when it detects an\n event of the specified type.

\n\n

By default, your bucket has no event notifications configured. That is, the notification\n configuration will be an empty NotificationConfiguration.

\n\n

\n \n

\n

\n \n

\n

This action replaces the existing notification configuration with the configuration\n you include in the request body.

\n\n

After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification\n Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, and\n that the bucket owner has permission to publish to it by sending a test notification. In\n the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions\n grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more information,\n see Configuring Notifications for Amazon S3\n Events.

\n\n

You can disable notifications by adding the empty NotificationConfiguration\n element.

\n\n

By default, only the bucket owner can configure notifications on a bucket. However,\n bucket owners can use a bucket policy to grant permission to other users to set this\n configuration with s3:PutBucketNotification permission.

\n\n \n

The PUT notification is an atomic operation. For example, suppose your notification\n configuration includes SNS topic, SQS queue, and Lambda function configurations. When\n you send a PUT request with this configuration, Amazon S3 sends test messages to your SNS\n topic. If the message fails, the entire PUT action will fail, and Amazon S3 will not add\n the configuration to your bucket.

\n
\n\n

\n Responses\n

\n

If the configuration in the request body includes only one\n TopicConfiguration specifying only the\n s3:ReducedRedundancyLostObject event type, the response will also include\n the x-amz-sns-test-message-id header containing the message ID of the test\n notification sent to the topic.

\n\n

The following action is related to\n PutBucketNotificationConfiguration:

\n ", + "smithy.api#documentation": "

Enables notifications of specified events for a bucket. For more information about event\n notifications, see Configuring Event\n Notifications.

\n\n

Using this API, you can replace an existing notification configuration. The\n configuration is an XML file that defines the event types that you want Amazon S3 to publish and\n the destination where you want Amazon S3 to publish an event notification when it detects an\n event of the specified type.

\n\n

By default, your bucket has no event notifications configured. That is, the notification\n configuration will be an empty NotificationConfiguration.

\n\n

\n \n

\n

\n \n

\n

This action replaces the existing notification configuration with the configuration\n you include in the request body.

\n\n

After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification\n Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, and\n that the bucket owner has permission to publish to it by sending a test notification. In\n the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions\n grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more information,\n see Configuring Notifications for Amazon S3\n Events.

\n\n

You can disable notifications by adding the empty NotificationConfiguration\n element.

\n

For more information about the number of event notification configurations that you can create per bucket, see\n Amazon S3 service quotas in Amazon Web Services General Reference.

\n

By default, only the bucket owner can configure notifications on a bucket. However,\n bucket owners can use a bucket policy to grant permission to other users to set this\n configuration with s3:PutBucketNotification permission.

\n\n \n

The PUT notification is an atomic operation. For example, suppose your notification\n configuration includes SNS topic, SQS queue, and Lambda function configurations. When\n you send a PUT request with this configuration, Amazon S3 sends test messages to your SNS\n topic. If the message fails, the entire PUT action will fail, and Amazon S3 will not add\n the configuration to your bucket.

\n
\n\n

\n Responses\n

\n

If the configuration in the request body includes only one\n TopicConfiguration specifying only the\n s3:ReducedRedundancyLostObject event type, the response will also include\n the x-amz-sns-test-message-id header containing the message ID of the test\n notification sent to the topic.

\n\n

The following action is related to\n PutBucketNotificationConfiguration:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?notification", @@ -9894,7 +10672,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } }, @@ -9913,13 +10691,15 @@ "target": "com.amazonaws.s3#PutBucketOwnershipControlsRequest" }, "traits": { + "aws.protocols#httpChecksum": { + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this\n operation, you must have the s3:PutBucketOwnershipControls permission. For\n more information about Amazon S3 permissions, see Specifying permissions in a policy.

\n

For information about Amazon S3 Object Ownership, see Using object ownership.

\n

The following operations are related to PutBucketOwnershipControls:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?ownershipControls", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketOwnershipControlsRequest": { @@ -9943,7 +10723,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } }, @@ -9964,13 +10744,16 @@ "target": "com.amazonaws.s3#PutBucketPolicyRequest" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using an identity other than\n the root user of the Amazon Web Services account that owns the bucket, the calling identity must have the\n PutBucketPolicy permissions on the specified bucket and belong to the\n bucket owner's account in order to use this operation.

\n\n

If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403\n Access Denied error. If you have the correct permissions, but you're not using an\n identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not\n Allowed error.

\n\n \n

As a security precaution, the root user of the Amazon Web Services account that owns a bucket can\n always use this operation, even if the policy explicitly denies the root user the\n ability to perform this action.

\n
\n

For more information, see Bucket policy examples.

\n\n

The following operations are related to PutBucketPolicy:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?policy", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketPolicyRequest": { @@ -9991,6 +10774,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "ConfirmRemoveSelfBucketAccess": { "target": "com.amazonaws.s3#ConfirmRemoveSelfBucketAccess", "traits": { @@ -10009,7 +10799,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10021,13 +10811,16 @@ "target": "com.amazonaws.s3#PutBucketReplicationRequest" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Creates a replication configuration or replaces an existing one. For more information,\n see Replication in the Amazon S3 User Guide.

\n \n

Specify the replication configuration in the request body. In the replication\n configuration, you provide the name of the destination bucket or buckets where you want\n Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to replicate objects on your\n behalf, and other relevant information.

\n\n\n

A replication configuration must include at least one rule, and can contain a maximum of\n 1,000. Each rule identifies a subset of objects to replicate by filtering the objects in\n the source bucket. To choose additional subsets of objects to replicate, add a rule for\n each subset.

\n\n

To specify a subset of the objects in the source bucket to apply a replication rule to,\n add the Filter element as a child of the Rule element. You can filter objects based on an\n object key prefix, one or more object tags, or both. When you add the Filter element in the\n configuration, you must also add the following elements:\n DeleteMarkerReplication, Status, and\n Priority.

\n \n

If you are using an earlier version of the replication configuration, Amazon S3 handles\n replication of delete markers differently. For more information, see Backward Compatibility.

\n
\n

For information about enabling versioning on a bucket, see Using Versioning.

\n\n

\n Handling Replication of Encrypted Objects\n

\n

By default, Amazon S3 doesn't replicate objects that are stored at rest using server-side\n encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects, add the\n following: SourceSelectionCriteria, SseKmsEncryptedObjects,\n Status, EncryptionConfiguration, and\n ReplicaKmsKeyID. For information about replication configuration, see\n Replicating Objects\n Created with SSE Using KMS keys.

\n\n

For information on PutBucketReplication errors, see List of\n replication-related error codes\n

\n\n

\n Permissions\n

\n

To create a PutBucketReplication request, you must have s3:PutReplicationConfiguration \n permissions for the bucket. \n

\n

By default, a resource owner, in this case the Amazon Web Services account that created the bucket, can\n perform this operation. The resource owner can also grant others permissions to perform the\n operation. For more information about permissions, see Specifying Permissions in a Policy\n and Managing Access Permissions to Your\n Amazon S3 Resources.

\n \n

To perform this operation, the user or role performing the action must have the\n iam:PassRole permission.

\n
\n\n

The following operations are related to PutBucketReplication:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?replication", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketReplicationRequest": { @@ -10048,6 +10841,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "ReplicationConfiguration": { "target": "com.amazonaws.s3#ReplicationConfiguration", "traits": { @@ -10066,7 +10866,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10078,13 +10878,16 @@ "target": "com.amazonaws.s3#PutBucketRequestPaymentRequest" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Sets the request payment configuration for a bucket. By default, the bucket owner pays\n for downloads from the bucket. This configuration parameter enables the bucket owner (only)\n to specify that the person requesting the download will be charged for the download. For\n more information, see Requester Pays\n Buckets.

\n\n

The following operations are related to PutBucketRequestPayment:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?requestPayment", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketRequestPaymentRequest": { @@ -10105,6 +10908,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "RequestPaymentConfiguration": { "target": "com.amazonaws.s3#RequestPaymentConfiguration", "traits": { @@ -10117,7 +10927,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10129,13 +10939,16 @@ "target": "com.amazonaws.s3#PutBucketTaggingRequest" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Sets the tags for a bucket.

\n

Use tags to organize your Amazon Web Services bill to reflect your own cost structure. To do this, sign\n up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost of\n combined resources, organize your billing information according to resources with the same\n tag key values. For example, you can tag several resources with a specific application\n name, and then organize your billing information to see the total cost of that application\n across several services. For more information, see Cost Allocation\n and Tagging and Using Cost Allocation in Amazon S3 Bucket\n Tags.

\n\n \n

\n When this operation sets the tags for a bucket, it will overwrite any current tags the \n bucket already has. You cannot use this operation to add tags to an existing list of tags.

\n
\n

To use this operation, you must have permissions to perform the\n s3:PutBucketTagging action. The bucket owner has this permission by default\n and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3\n Resources.

\n\n

\n PutBucketTagging has the following special errors:

\n
    \n
  • \n

    Error code: InvalidTagError\n

    \n \n
  • \n
  • \n

    Error code: MalformedXMLError\n

    \n
      \n
    • \n

      Description: The XML provided does not match the schema.

      \n
    • \n
    \n
  • \n
  • \n

    Error code: OperationAbortedError \n

    \n
      \n
    • \n

      Description: A conflicting conditional action is currently in progress\n against this resource. Please try again.

      \n
    • \n
    \n
  • \n
  • \n

    Error code: InternalError\n

    \n
      \n
    • \n

      Description: The service was unable to apply the provided tag to the\n bucket.

      \n
    • \n
    \n
  • \n
\n\n\n

The following operations are related to PutBucketTagging:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?tagging", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketTaggingRequest": { @@ -10156,6 +10969,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "Tagging": { "target": "com.amazonaws.s3#Tagging", "traits": { @@ -10168,7 +10988,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10180,13 +11000,16 @@ "target": "com.amazonaws.s3#PutBucketVersioningRequest" }, "traits": { - "smithy.api#documentation": "

Sets the versioning state of an existing bucket. To set the versioning state, you must\n be the bucket owner.

\n

You can set the versioning state with one of the following values:

\n\n

\n Enabled—Enables versioning for the objects in the\n bucket. All objects added to the bucket receive a unique version ID.

\n\n

\n Suspended—Disables versioning for the objects in the\n bucket. All objects added to the bucket receive the version ID null.

\n\n

If the versioning state has never been set on a bucket, it has no versioning state; a\n GetBucketVersioning request does not return a versioning state value.

\n\n

If the bucket owner enables MFA Delete in the bucket versioning configuration, the\n bucket owner must include the x-amz-mfa request header and the\n Status and the MfaDelete request elements in a request to set\n the versioning state of the bucket.

\n\n \n

If you have an object expiration lifecycle policy in your non-versioned bucket and\n you want to maintain the same permanent delete behavior when you enable versioning, you\n must add a noncurrent expiration policy. The noncurrent expiration lifecycle policy will\n manage the deletes of the noncurrent object versions in the version-enabled bucket. (A\n version-enabled bucket maintains one current and zero or more noncurrent object\n versions.) For more information, see Lifecycle and Versioning.

\n
\n\n

\n Related Resources\n

\n ", + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

Sets the versioning state of an existing bucket.

\n

You can set the versioning state with one of the following values:

\n\n

\n Enabled—Enables versioning for the objects in the\n bucket. All objects added to the bucket receive a unique version ID.

\n\n

\n Suspended—Disables versioning for the objects in the\n bucket. All objects added to the bucket receive the version ID null.

\n\n

If the versioning state has never been set on a bucket, it has no versioning state; a\n GetBucketVersioning request does not return a versioning state value.

\n\n

In order to enable MFA Delete, you must be the bucket owner. If you are the bucket owner\n and want to enable MFA Delete in the bucket versioning configuration, you must\n include the x-amz-mfa request header and the\n Status and the MfaDelete request elements in a request to set\n the versioning state of the bucket.

\n\n \n

If you have an object expiration lifecycle policy in your non-versioned bucket and\n you want to maintain the same permanent delete behavior when you enable versioning, you\n must add a noncurrent expiration policy. The noncurrent expiration lifecycle policy will\n manage the deletes of the noncurrent object versions in the version-enabled bucket. (A\n version-enabled bucket maintains one current and zero or more noncurrent object\n versions.) For more information, see Lifecycle and Versioning.

\n
\n\n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?versioning", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketVersioningRequest": { @@ -10207,6 +11030,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "MFA": { "target": "com.amazonaws.s3#MFA", "traits": { @@ -10226,7 +11056,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10238,13 +11068,16 @@ "target": "com.amazonaws.s3#PutBucketWebsiteRequest" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Sets the configuration of the website that is specified in the website\n subresource. To configure a bucket as a website, you can add this subresource on the bucket\n with website configuration information such as the file name of the index document and any\n redirect rules. For more information, see Hosting Websites on Amazon S3.

\n\n

This PUT action requires the S3:PutBucketWebsite permission. By default,\n only the bucket owner can configure the website attached to a bucket; however, bucket\n owners can allow other users to set the website configuration by writing a bucket policy\n that grants them the S3:PutBucketWebsite permission.

\n\n

To redirect all website requests sent to the bucket's website endpoint, you add a\n website configuration with the following elements. Because all requests are sent to another\n website, you don't need to provide index document name for the bucket.

\n
    \n
  • \n

    \n WebsiteConfiguration\n

    \n
  • \n
  • \n

    \n RedirectAllRequestsTo\n

    \n
  • \n
  • \n

    \n HostName\n

    \n
  • \n
  • \n

    \n Protocol\n

    \n
  • \n
\n\n

If you want granular control over redirects, you can use the following elements to add\n routing rules that describe conditions for redirecting requests and information about the\n redirect destination. In this case, the website configuration must provide an index\n document for the bucket, because some requests might not be redirected.

\n
    \n
  • \n

    \n WebsiteConfiguration\n

    \n
  • \n
  • \n

    \n IndexDocument\n

    \n
  • \n
  • \n

    \n Suffix\n

    \n
  • \n
  • \n

    \n ErrorDocument\n

    \n
  • \n
  • \n

    \n Key\n

    \n
  • \n
  • \n

    \n RoutingRules\n

    \n
  • \n
  • \n

    \n RoutingRule\n

    \n
  • \n
  • \n

    \n Condition\n

    \n
  • \n
  • \n

    \n HttpErrorCodeReturnedEquals\n

    \n
  • \n
  • \n

    \n KeyPrefixEquals\n

    \n
  • \n
  • \n

    \n Redirect\n

    \n
  • \n
  • \n

    \n Protocol\n

    \n
  • \n
  • \n

    \n HostName\n

    \n
  • \n
  • \n

    \n ReplaceKeyPrefixWith\n

    \n
  • \n
  • \n

    \n ReplaceKeyWith\n

    \n
  • \n
  • \n

    \n HttpRedirectCode\n

    \n
  • \n
\n\n

Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more\n than 50 routing rules, you can use object redirect. For more information, see Configuring an\n Object Redirect in the Amazon S3 User Guide.

", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?website", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutBucketWebsiteRequest": { @@ -10265,6 +11098,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "WebsiteConfiguration": { "target": "com.amazonaws.s3#WebsiteConfiguration", "traits": { @@ -10277,7 +11117,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10292,6 +11132,9 @@ "target": "com.amazonaws.s3#PutObjectOutput" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, "smithy.api#documentation": "

Adds an object to a bucket. You must have WRITE permissions on a bucket to add an object\n to it.

\n\n\n

Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the\n entire object to the bucket.

\n\n

Amazon S3 is a distributed system. If it receives multiple write requests for the same object\n simultaneously, it overwrites all but the last object written. Amazon S3 does not provide object\n locking; if you need this, make sure to build it into your application layer or use\n versioning instead.

\n\n

To ensure that data is not corrupted traversing the network, use the\n Content-MD5 header. When you use this header, Amazon S3 checks the object\n against the provided MD5 value and, if they do not match, returns an error. Additionally,\n you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to\n the calculated MD5 value.

\n \n
    \n
  • \n

    To successfully complete the PutObject request, you must have the \n s3:PutObject in your IAM permissions.

    \n
  • \n
  • \n

    To successfully change the objects acl of your PutObject request, \n you must have the s3:PutObjectAcl in your IAM permissions.

    \n
  • \n
  • \n

    The Content-MD5 header is required for any request to upload an object\n with a retention period configured using Amazon S3 Object Lock. For more information about\n Amazon S3 Object Lock, see Amazon S3 Object Lock Overview\n in the Amazon S3 User Guide.

    \n
  • \n
\n
\n

\n Server-side Encryption\n

\n

You can optionally request server-side encryption. With server-side encryption, Amazon S3 encrypts \n your data as it writes it to disks in its data centers and decrypts the data\n when you access it. You have the option to provide your own encryption key or use Amazon Web Services\n managed encryption keys (SSE-S3 or SSE-KMS). For more information, see Using Server-Side\n Encryption.

\n

If you request server-side encryption using Amazon Web Services Key Management Service (SSE-KMS), you can enable \n an S3 Bucket Key at the object-level. For more information, see Amazon S3 Bucket Keys in the \n Amazon S3 User Guide.

\n

\n Access Control List (ACL)-Specific Request\n Headers\n

\n

You can use headers to grant ACL- based permissions. By default, all objects are\n private. Only the owner has full access control. When adding a new object, you can grant\n permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These\n permissions are then added to the ACL on the object. For more information, see Access Control List\n (ACL) Overview and Managing ACLs Using the REST\n API.

\n

If the bucket that you're uploading objects to uses the bucket owner enforced setting\n for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that\n use this setting only accept PUT requests that don't specify an ACL or PUT requests that\n specify bucket owner full control ACLs, such as the bucket-owner-full-control canned\n ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other\n ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a\n 400 error with the error code\n AccessControlListNotSupported.

\n

For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.

\n \n

If your bucket uses the bucket owner enforced setting for Object Ownership, \n all objects written to the bucket by any account will be owned by the bucket owner.

\n
\n

\n Storage Class Options\n

\n

By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The\n STANDARD storage class provides high durability and high availability. Depending on\n performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses\n the OUTPOSTS Storage Class. For more information, see Storage Classes in the\n Amazon S3 User Guide.

\n\n\n

\n Versioning\n

\n

If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID\n for the object being stored. Amazon S3 returns this ID in the response. When you enable\n versioning for a bucket, if Amazon S3 receives multiple write requests for the same object\n simultaneously, it stores all of the objects.

\n

For more information about versioning, see Adding Objects to\n Versioning Enabled Buckets. For information about returning the versioning state\n of a bucket, see GetBucketVersioning.

\n\n\n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "PUT", @@ -10314,13 +11157,16 @@ } ], "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Uses the acl subresource to set the access control list (ACL) permissions\n for a new or existing object in an S3 bucket. You must have WRITE_ACP\n permission to set the ACL of an object. For more information, see What\n permissions can I grant? in the Amazon S3 User Guide.

\n

This action is not supported by Amazon S3 on Outposts.

\n

Depending on your application needs, you can choose to set\n the ACL on an object using either the request body or the headers. For example, if you have\n an existing application that updates a bucket ACL using the request body, you can continue\n to use that approach. For more information, see Access Control List (ACL) Overview in the Amazon S3 User Guide.

\n \n

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. \n You must use policies to grant access to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and \n return the AccessControlListNotSupported error code. Requests to read ACLs are still supported.\n For more information, see Controlling object ownership\n in the Amazon S3 User Guide.

\n
\n\n

\n Access Permissions\n

\n

You can set access permissions using one of the following methods:

\n
    \n
  • \n

    Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports\n a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set\n of grantees and permissions. Specify the canned ACL name as the value of\n x-amz-acl. If you use this header, you cannot use other access\n control-specific headers in your request. For more information, see Canned ACL.

    \n
  • \n
  • \n

    Specify access permissions explicitly with the x-amz-grant-read,\n x-amz-grant-read-acp, x-amz-grant-write-acp, and\n x-amz-grant-full-control headers. When using these headers, you\n specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 groups) who\n will receive the permission. If you use these ACL-specific headers, you cannot use\n x-amz-acl header to set a canned ACL. These parameters map to the set\n of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL)\n Overview.

    \n\n

    You specify each grantee as a type=value pair, where the type is one of the\n following:

    \n
      \n
    • \n

      \n id – if the value specified is the canonical user ID of an Amazon Web Services account

      \n
    • \n
    • \n

      \n uri – if you are granting permissions to a predefined\n group

      \n
    • \n
    • \n

      \n emailAddress – if the value specified is the email address of\n an Amazon Web Services account

      \n \n

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      \n
        \n
      • \n

        US East (N. Virginia)

        \n
      • \n
      • \n

        US West (N. California)

        \n
      • \n
      • \n

        US West (Oregon)

        \n
      • \n
      • \n

        Asia Pacific (Singapore)

        \n
      • \n
      • \n

        Asia Pacific (Sydney)

        \n
      • \n
      • \n

        Asia Pacific (Tokyo)

        \n
      • \n
      • \n

        Europe (Ireland)

        \n
      • \n
      • \n

        South America (São Paulo)

        \n
      • \n
      \n

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      \n
      \n
    • \n
    \n

    For example, the following x-amz-grant-read header grants list\n objects permission to the two Amazon Web Services accounts identified by their email\n addresses.

    \n

    \n x-amz-grant-read: emailAddress=\"xyz@amazon.com\",\n emailAddress=\"abc@amazon.com\" \n

    \n\n
  • \n
\n

You can use either a canned ACL or specify access permissions explicitly. You cannot do\n both.

\n

\n Grantee Values\n

\n

You can specify the person (grantee) to whom you're assigning access rights (using\n request elements) in the following ways:

\n
    \n
  • \n

    By the person's ID:

    \n

    \n <>ID<><>GranteesEmail<>\n \n

    \n

    DisplayName is optional and ignored in the request.

    \n
  • \n
  • \n

    By URI:

    \n

    \n <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>\n

    \n
  • \n
  • \n

    By Email address:

    \n

    \n <>Grantees@email.com<>lt;/Grantee>\n

    \n

    The grantee is resolved to the CanonicalUser and, in a response to a GET Object\n acl request, appears as the CanonicalUser.

    \n \n

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    \n
      \n
    • \n

      US East (N. Virginia)

      \n
    • \n
    • \n

      US West (N. California)

      \n
    • \n
    • \n

      US West (Oregon)

      \n
    • \n
    • \n

      Asia Pacific (Singapore)

      \n
    • \n
    • \n

      Asia Pacific (Sydney)

      \n
    • \n
    • \n

      Asia Pacific (Tokyo)

      \n
    • \n
    • \n

      Europe (Ireland)

      \n
    • \n
    • \n

      South America (São Paulo)

      \n
    • \n
    \n

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    \n
    \n
  • \n
\n

\n Versioning\n

\n

The ACL of an object is set at the object version level. By default, PUT sets the ACL of\n the current version of an object. To set the ACL of a different version, use the\n versionId subresource.

\n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}/{Key+}?acl", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutObjectAclOutput": { @@ -10367,6 +11213,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "GrantFullControl": { "target": "com.amazonaws.s3#GrantFullControl", "traits": { @@ -10405,7 +11258,7 @@ "Key": { "target": "com.amazonaws.s3#ObjectKey", "traits": { - "smithy.api#documentation": "

Key for which the PUT action was initiated.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

Key for which the PUT action was initiated.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10426,7 +11279,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10441,13 +11294,16 @@ "target": "com.amazonaws.s3#PutObjectLegalHoldOutput" }, "traits": { - "smithy.api#documentation": "

Applies a Legal Hold configuration to the specified object. For more information, see\n Locking\n Objects.

\n

This action is not supported by Amazon S3 on Outposts.

", + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

Applies a legal hold configuration to the specified object. For more information, see\n Locking\n Objects.

\n

This action is not supported by Amazon S3 on Outposts.

", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}/{Key+}?legal-hold", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutObjectLegalHoldOutput": { @@ -10467,7 +11323,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name containing the object that you want to place a Legal Hold on.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name containing the object that you want to place a legal hold on.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10475,7 +11331,7 @@ "Key": { "target": "com.amazonaws.s3#ObjectKey", "traits": { - "smithy.api#documentation": "

The key name for the object that you want to place a Legal Hold on.

", + "smithy.api#documentation": "

The key name for the object that you want to place a legal hold on.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10483,7 +11339,7 @@ "LegalHold": { "target": "com.amazonaws.s3#ObjectLockLegalHold", "traits": { - "smithy.api#documentation": "

Container element for the Legal Hold configuration you want to apply to the specified\n object.

", + "smithy.api#documentation": "

Container element for the legal hold configuration you want to apply to the specified\n object.

", "smithy.api#httpPayload": {}, "smithy.api#xmlName": "LegalHold" } @@ -10497,7 +11353,7 @@ "VersionId": { "target": "com.amazonaws.s3#ObjectVersionId", "traits": { - "smithy.api#documentation": "

The version ID of the object that you want to place a Legal Hold on.

", + "smithy.api#documentation": "

The version ID of the object that you want to place a legal hold on.

", "smithy.api#httpQuery": "versionId" } }, @@ -10508,10 +11364,17 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10526,13 +11389,16 @@ "target": "com.amazonaws.s3#PutObjectLockConfigurationOutput" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Places an Object Lock configuration on the specified bucket. The rule specified in the\n Object Lock configuration will be applied by default to every new object placed in the\n specified bucket. For more information, see Locking Objects.\n

\n \n
    \n
  • \n

    The DefaultRetention settings require both a mode and a\n period.

    \n
  • \n
  • \n

    The DefaultRetention period can be either Days\n or Years but you must select one. You cannot specify Days\n and Years at the same time.

    \n
  • \n
  • \n

    You can only enable Object Lock for new buckets. If you want to turn on\n Object Lock for an existing bucket, contact Amazon Web Services Support.

    \n
  • \n
\n
", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?object-lock", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutObjectLockConfigurationOutput": { @@ -10585,10 +11451,17 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10600,7 +11473,7 @@ "Expiration": { "target": "com.amazonaws.s3#Expiration", "traits": { - "smithy.api#documentation": "

If the expiration is configured for the object (see PutBucketLifecycleConfiguration), the response includes this header. It\n includes the expiry-date and rule-id key-value pairs that provide information about object\n expiration. The value of the rule-id is URL encoded.

", + "smithy.api#documentation": "

If the expiration is configured for the object (see PutBucketLifecycleConfiguration), the response includes this header. It\n includes the expiry-date and rule-id key-value pairs that provide\n information about object expiration. The value of the rule-id is\n URL-encoded.

", "smithy.api#httpHeader": "x-amz-expiration" } }, @@ -10611,6 +11484,34 @@ "smithy.api#httpHeader": "ETag" } }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32c" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha1" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha256" + } + }, "ServerSideEncryption": { "target": "com.amazonaws.s3#ServerSideEncryption", "traits": { @@ -10688,7 +11589,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name to which the PUT action was initiated.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name to which the PUT action was initiated.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -10742,6 +11643,41 @@ "smithy.api#httpHeader": "Content-Type" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 32-bit CRC32C checksum of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32c" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha1" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha256" + } + }, "Expires": { "target": "com.amazonaws.s3#Expires", "traits": { @@ -10892,7 +11828,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10907,13 +11843,16 @@ "target": "com.amazonaws.s3#PutObjectRetentionOutput" }, "traits": { - "smithy.api#documentation": "

Places an Object Retention configuration on an object. For more information, see Locking Objects.\n Users or accounts require the s3:PutObjectRetention permission in order to place\n an Object Retention configuration on objects. Bypassing a Governance Retention configuration\n requires the s3:BypassGovernanceRetention permission.\n

\n

This action is not supported by Amazon S3 on Outposts.

\n\n

\n Permissions\n

\n

When the Object Lock retention mode is set to compliance, you need s3:PutObjectRetention and \n s3:BypassGovernanceRetention permissions. For other requests to PutObjectRetention, \n only s3:PutObjectRetention permissions are required.

", + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, + "smithy.api#documentation": "

Places an Object Retention configuration on an object. For more information, see Locking Objects.\n Users or accounts require the s3:PutObjectRetention permission in order to place\n an Object Retention configuration on objects. Bypassing a Governance Retention configuration\n requires the s3:BypassGovernanceRetention permission.\n

\n

This action is not supported by Amazon S3 on Outposts.

", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}/{Key+}?retention", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutObjectRetentionOutput": { @@ -10981,10 +11920,17 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -10999,13 +11945,16 @@ "target": "com.amazonaws.s3#PutObjectTaggingOutput" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Sets the supplied tag-set to an object that already exists in a bucket.

\n

A tag is a key-value pair. You can associate tags with an object by sending a PUT\n request against the tagging subresource that is associated with the object. You can\n retrieve tags by sending a GET request. For more information, see GetObjectTagging.

\n\n

For tagging-related restrictions related to characters and encodings, see Tag\n Restrictions. Note that Amazon S3 limits the maximum number of tags to 10 tags per\n object.

\n\n

To use this operation, you must have permission to perform the\n s3:PutObjectTagging action. By default, the bucket owner has this\n permission and can grant this permission to others.

\n\n

To put tags of any other version, use the versionId query parameter. You\n also need permission for the s3:PutObjectVersionTagging action.

\n\n

For information about the Amazon S3 object tagging feature, see Object Tagging.

\n\n\n

\n Special Errors\n

\n
    \n
  • \n
      \n
    • \n

      \n Code: InvalidTagError \n

      \n
    • \n
    • \n

      \n Cause: The tag provided was not a valid tag. This error can occur\n if the tag did not pass input validation. For more information, see Object Tagging.\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: MalformedXMLError \n

      \n
    • \n
    • \n

      \n Cause: The XML provided does not match the schema.\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: OperationAbortedError \n

      \n
    • \n
    • \n

      \n Cause: A conflicting conditional action is currently in\n progress against this resource. Please try again.\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InternalError\n

      \n
    • \n
    • \n

      \n Cause: The service was unable to apply the provided tag to the\n object.\n

      \n
    • \n
    \n
  • \n
\n\n \n\n\n\n\n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}/{Key+}?tagging", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutObjectTaggingOutput": { @@ -11026,7 +11975,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name containing the object.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name containing the object.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11053,6 +12002,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "Tagging": { "target": "com.amazonaws.s3#Tagging", "traits": { @@ -11065,7 +12021,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } }, @@ -11083,13 +12039,16 @@ "target": "com.amazonaws.s3#PutPublicAccessBlockRequest" }, "traits": { + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm", + "requestChecksumRequired": true + }, "smithy.api#documentation": "

Creates or modifies the PublicAccessBlock configuration for an Amazon S3 bucket.\n To use this operation, you must have the s3:PutBucketPublicAccessBlock\n permission. For more information about Amazon S3 permissions, see Specifying Permissions in a\n Policy.

\n\n \n

When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or\n an object, it checks the PublicAccessBlock configuration for both the\n bucket (or the bucket that contains the object) and the bucket owner's account. If the\n PublicAccessBlock configurations are different between the bucket and\n the account, Amazon S3 uses the most restrictive combination of the bucket-level and\n account-level settings.

\n
\n\n\n

For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".

\n\n\n\n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}?publicAccessBlock", "code": 200 - }, - "smithy.api#httpChecksumRequired": {} + } } }, "com.amazonaws.s3#PutPublicAccessBlockRequest": { @@ -11110,6 +12069,13 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "PublicAccessBlockConfiguration": { "target": "com.amazonaws.s3#PublicAccessBlockConfiguration", "traits": { @@ -11122,7 +12088,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -11552,7 +12518,7 @@ "com.amazonaws.s3#RequestPayer": { "type": "string", "traits": { - "smithy.api#documentation": "

Confirms that the requester knows that they will be charged for the request. Bucket\n owners need not specify this parameter in their requests. For information about downloading\n objects from requester pays buckets, see Downloading Objects in\n Requestor Pays Buckets in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

Confirms that the requester knows that they will be charged for the request. Bucket\n owners need not specify this parameter in their requests. For information about downloading\n objects from Requester Pays buckets, see Downloading Objects in\n Requester Pays Buckets in the Amazon S3 User Guide.

", "smithy.api#enum": [ { "value": "requester", @@ -11634,7 +12600,10 @@ } ], "traits": { - "smithy.api#documentation": "

Restores an archived copy of an object back into Amazon S3

\n

This action is not supported by Amazon S3 on Outposts.

\n

This action performs the following types of requests:

\n
    \n
  • \n

    \n select - Perform a select query on an archived object

    \n
  • \n
  • \n

    \n restore an archive - Restore an archived object

    \n
  • \n
\n

To use this operation, you must have permissions to perform the\n s3:RestoreObject action. The bucket owner has this permission by default\n and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3\n Resources in the Amazon S3 User Guide.

\n

\n Querying Archives with Select Requests\n

\n

You use a select type of request to perform SQL queries on archived objects. The\n archived objects that are being queried by the select request must be formatted as\n uncompressed comma-separated values (CSV) files. You can run queries and custom analytics\n on your archived data without having to restore your data to a hotter Amazon S3 tier. For an\n overview about select requests, see Querying Archived Objects in the Amazon S3 User Guide.

\n

When making a select request, do the following:

\n
    \n
  • \n

    Define an output location for the select query's output. This must be an Amazon S3\n bucket in the same Amazon Web Services Region as the bucket that contains the archive object that is\n being queried. The Amazon Web Services account that initiates the job must have permissions to write\n to the S3 bucket. You can specify the storage class and encryption for the output\n objects stored in the bucket. For more information about output, see Querying Archived Objects\n in the Amazon S3 User Guide.

    \n

    For more information about the S3 structure in the request body, see\n the following:

    \n \n
  • \n
  • \n

    Define the SQL expression for the SELECT type of restoration for your\n query in the request body's SelectParameters structure. You can use\n expressions like the following examples.

    \n
      \n
    • \n

      The following expression returns all records from the specified\n object.

      \n

      \n SELECT * FROM Object\n

      \n
    • \n
    • \n

      Assuming that you are not using any headers for data stored in the object,\n you can specify columns with positional headers.

      \n

      \n SELECT s._1, s._2 FROM Object s WHERE s._3 > 100\n

      \n
    • \n
    • \n

      If you have headers and you set the fileHeaderInfo in the\n CSV structure in the request body to USE, you can\n specify headers in the query. (If you set the fileHeaderInfo field\n to IGNORE, the first row is skipped for the query.) You cannot mix\n ordinal positions with header column names.

      \n

      \n SELECT s.Id, s.FirstName, s.SSN FROM S3Object s\n

      \n
    • \n
    \n
  • \n
\n

For more information about using SQL with S3 Glacier Select restore, see SQL Reference for Amazon S3 Select and\n S3 Glacier Select in the Amazon S3 User Guide.

\n

When making a select request, you can also do the following:

\n
    \n
  • \n

    To expedite your queries, specify the Expedited tier. For more\n information about tiers, see \"Restoring Archives,\" later in this topic.

    \n
  • \n
  • \n

    Specify details about the data serialization format of both the input object that\n is being queried and the serialization of the CSV-encoded query results.

    \n
  • \n
\n

The following are additional important facts about the select feature:

\n
    \n
  • \n

    The output results are new Amazon S3 objects. Unlike archive retrievals, they are\n stored until explicitly deleted-manually or through a lifecycle policy.

    \n
  • \n
  • \n

    You can issue more than one select request on the same Amazon S3 object. Amazon S3 doesn't\n deduplicate requests, so avoid issuing duplicate requests.

    \n
  • \n
  • \n

    Amazon S3 accepts a select request even if the object has already been restored. A\n select request doesn’t return error response 409.

    \n
  • \n
\n

\n Restoring objects\n

\n

Objects that you archive to the S3 Glacier or\n S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or\n S3 Intelligent-Tiering Deep Archive tiers are not accessible in real time. For objects in\n Archive Access or Deep Archive Access tiers you must first initiate a restore request, and\n then wait until the object is moved into the Frequent Access tier. For objects in\n S3 Glacier or S3 Glacier Deep Archive storage classes you must\n first initiate a restore request, and then wait until a temporary copy of the object is\n available. To access an archived object, you must restore the object for the duration\n (number of days) that you specify.

\n

To restore a specific object version, you can provide a version ID. If you don't provide\n a version ID, Amazon S3 restores the current version.

\n

When restoring an archived object (or using a select request), you can specify one of\n the following data access tier options in the Tier element of the request\n body:

\n
    \n
  • \n

    \n \n Expedited\n - Expedited retrievals\n allow you to quickly access your data stored in the S3 Glacier\n storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests for a\n subset of archives are required. For all but the largest archived objects (250 MB+),\n data accessed using Expedited retrievals is typically made available within 1–5\n minutes. Provisioned capacity ensures that retrieval capacity for Expedited\n retrievals is available when you need it. Expedited retrievals and provisioned\n capacity are not available for objects stored in the S3 Glacier Deep Archive\n storage class or S3 Intelligent-Tiering Deep Archive tier.

    \n
  • \n
  • \n

    \n \n Standard\n - Standard retrievals allow\n you to access any of your archived objects within several hours. This is the default\n option for retrieval requests that do not specify the retrieval option. Standard\n retrievals typically finish within 3–5 hours for objects stored in the\n S3 Glacier storage class or S3 Intelligent-Tiering Archive tier. They\n typically finish within 12 hours for objects stored in the\n S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.\n Standard retrievals are free for objects stored in S3 Intelligent-Tiering.

    \n
  • \n
  • \n

    \n \n Bulk\n - Bulk retrievals are the\n lowest-cost retrieval option in S3 Glacier, enabling you to retrieve large amounts,\n even petabytes, of data inexpensively. Bulk retrievals typically finish within 5–12\n hours for objects stored in the S3 Glacier storage class or\n S3 Intelligent-Tiering Archive tier. They typically finish within 48 hours for objects stored\n in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.\n Bulk retrievals are free for objects stored in S3 Intelligent-Tiering.

    \n
  • \n
\n

For more information about archive retrieval options and provisioned capacity for\n Expedited data access, see Restoring Archived Objects in the Amazon S3 User Guide.

\n

You can use Amazon S3 restore speed upgrade to change the restore speed to a faster speed\n while it is in progress. For more information, see \n Upgrading the speed of an in-progress restore in the\n Amazon S3 User Guide.

\n

To get the status of object restoration, you can send a HEAD request.\n Operations return the x-amz-restore header, which provides information about\n the restoration status, in the response. You can use Amazon S3 event notifications to notify you\n when a restore is initiated or completed. For more information, see Configuring Amazon S3 Event Notifications in\n the Amazon S3 User Guide.

\n

After restoring an archived object, you can update the restoration period by reissuing\n the request with a new period. Amazon S3 updates the restoration period relative to the current\n time and charges only for the request-there are no data transfer charges. You cannot\n update the restoration period when Amazon S3 is actively processing your current restore request\n for the object.

\n

If your bucket has a lifecycle configuration with a rule that includes an expiration\n action, the object expiration overrides the life span that you specify in a restore\n request. For example, if you restore an object copy for 10 days, but the object is\n scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days. For more information\n about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle Management in\n Amazon S3 User Guide.

\n

\n Responses\n

\n

A successful action returns either the 200 OK or 202\n Accepted status code.

\n
    \n
  • \n

    If the object is not previously restored, then Amazon S3 returns 202\n Accepted in the response.

    \n
  • \n
  • \n

    If the object is previously restored, Amazon S3 returns 200 OK in the\n response.

    \n
  • \n
\n

\n Special Errors\n

\n
    \n
  • \n
      \n
    • \n

      \n Code: RestoreAlreadyInProgress\n

      \n
    • \n
    • \n

      \n Cause: Object restore is already in progress. (This error does not\n apply to SELECT type requests.)\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict\n

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: GlacierExpeditedRetrievalNotAvailable\n

      \n
    • \n
    • \n

      \n Cause: expedited retrievals are currently not available. Try again\n later. (Returned if there is insufficient capacity to process the Expedited\n request. This error applies only to Expedited retrievals and not to\n S3 Standard or Bulk retrievals.)\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 503\n

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: N/A\n

      \n
    • \n
    \n
  • \n
\n \n

\n Related Resources\n

\n ", + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "

Restores an archived copy of an object back into Amazon S3

\n

This action is not supported by Amazon S3 on Outposts.

\n

This action performs the following types of requests:

\n
    \n
  • \n

    \n select - Perform a select query on an archived object

    \n
  • \n
  • \n

    \n restore an archive - Restore an archived object

    \n
  • \n
\n

To use this operation, you must have permissions to perform the\n s3:RestoreObject action. The bucket owner has this permission by default\n and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3\n Resources in the Amazon S3 User Guide.

\n

\n Querying Archives with Select Requests\n

\n

You use a select type of request to perform SQL queries on archived objects. The\n archived objects that are being queried by the select request must be formatted as\n uncompressed comma-separated values (CSV) files. You can run queries and custom analytics\n on your archived data without having to restore your data to a hotter Amazon S3 tier. For an\n overview about select requests, see Querying Archived Objects in the Amazon S3 User Guide.

\n

When making a select request, do the following:

\n
    \n
  • \n

    Define an output location for the select query's output. This must be an Amazon S3\n bucket in the same Amazon Web Services Region as the bucket that contains the archive object that is\n being queried. The Amazon Web Services account that initiates the job must have permissions to write\n to the S3 bucket. You can specify the storage class and encryption for the output\n objects stored in the bucket. For more information about output, see Querying Archived Objects\n in the Amazon S3 User Guide.

    \n

    For more information about the S3 structure in the request body, see\n the following:

    \n \n
  • \n
  • \n

    Define the SQL expression for the SELECT type of restoration for your\n query in the request body's SelectParameters structure. You can use\n expressions like the following examples.

    \n
      \n
    • \n

      The following expression returns all records from the specified\n object.

      \n

      \n SELECT * FROM Object\n

      \n
    • \n
    • \n

      Assuming that you are not using any headers for data stored in the object,\n you can specify columns with positional headers.

      \n

      \n SELECT s._1, s._2 FROM Object s WHERE s._3 > 100\n

      \n
    • \n
    • \n

      If you have headers and you set the fileHeaderInfo in the\n CSV structure in the request body to USE, you can\n specify headers in the query. (If you set the fileHeaderInfo field\n to IGNORE, the first row is skipped for the query.) You cannot mix\n ordinal positions with header column names.

      \n

      \n SELECT s.Id, s.FirstName, s.SSN FROM S3Object s\n

      \n
    • \n
    \n
  • \n
\n

For more information about using SQL with S3 Glacier Select restore, see SQL Reference for Amazon S3 Select and\n S3 Glacier Select in the Amazon S3 User Guide.

\n

When making a select request, you can also do the following:

\n
    \n
  • \n

    To expedite your queries, specify the Expedited tier. For more\n information about tiers, see \"Restoring Archives,\" later in this topic.

    \n
  • \n
  • \n

    Specify details about the data serialization format of both the input object that\n is being queried and the serialization of the CSV-encoded query results.

    \n
  • \n
\n

The following are additional important facts about the select feature:

\n
    \n
  • \n

    The output results are new Amazon S3 objects. Unlike archive retrievals, they are\n stored until explicitly deleted-manually or through a lifecycle policy.

    \n
  • \n
  • \n

    You can issue more than one select request on the same Amazon S3 object. Amazon S3 doesn't\n deduplicate requests, so avoid issuing duplicate requests.

    \n
  • \n
  • \n

    Amazon S3 accepts a select request even if the object has already been restored. A\n select request doesn’t return error response 409.

    \n
  • \n
\n

\n Restoring objects\n

\n

Objects that you archive to the S3 Glacier or\n S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or\n S3 Intelligent-Tiering Deep Archive tiers are not accessible in real time. For objects in\n Archive Access or Deep Archive Access tiers you must first initiate a restore request, and\n then wait until the object is moved into the Frequent Access tier. For objects in\n S3 Glacier or S3 Glacier Deep Archive storage classes you must\n first initiate a restore request, and then wait until a temporary copy of the object is\n available. To access an archived object, you must restore the object for the duration\n (number of days) that you specify.

\n

To restore a specific object version, you can provide a version ID. If you don't provide\n a version ID, Amazon S3 restores the current version.

\n

When restoring an archived object (or using a select request), you can specify one of\n the following data access tier options in the Tier element of the request\n body:

\n
    \n
  • \n

    \n Expedited - Expedited retrievals allow you to quickly access your\n data stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive\n tier when occasional urgent requests for a subset of archives are required. For all\n but the largest archived objects (250 MB+), data accessed using Expedited retrievals\n is typically made available within 1–5 minutes. Provisioned capacity ensures that\n retrieval capacity for Expedited retrievals is available when you need it. Expedited\n retrievals and provisioned capacity are not available for objects stored in the\n S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.

    \n
  • \n
  • \n

    \n Standard - Standard retrievals allow you to access any of your\n archived objects within several hours. This is the default option for retrieval\n requests that do not specify the retrieval option. Standard retrievals typically\n finish within 3–5 hours for objects stored in the S3 Glacier storage\n class or S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for\n objects stored in the S3 Glacier Deep Archive storage class or\n S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored in\n S3 Intelligent-Tiering.

    \n
  • \n
  • \n

    \n Bulk - Bulk retrievals are the lowest-cost retrieval option in\n S3 Glacier, enabling you to retrieve large amounts, even petabytes, of data\n inexpensively. Bulk retrievals typically finish within 5–12 hours for objects stored\n in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier. They\n typically finish within 48 hours for objects stored in the\n S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier. Bulk\n retrievals are free for objects stored in S3 Intelligent-Tiering.

    \n
  • \n
\n

For more information about archive retrieval options and provisioned capacity for\n Expedited data access, see Restoring Archived Objects in the Amazon S3 User Guide.

\n

You can use Amazon S3 restore speed upgrade to change the restore speed to a faster speed\n while it is in progress. For more information, see \n Upgrading the speed of an in-progress restore in the\n Amazon S3 User Guide.

\n

To get the status of object restoration, you can send a HEAD request.\n Operations return the x-amz-restore header, which provides information about\n the restoration status, in the response. You can use Amazon S3 event notifications to notify you\n when a restore is initiated or completed. For more information, see Configuring Amazon S3 Event Notifications in\n the Amazon S3 User Guide.

\n

After restoring an archived object, you can update the restoration period by reissuing\n the request with a new period. Amazon S3 updates the restoration period relative to the current\n time and charges only for the request-there are no data transfer charges. You cannot\n update the restoration period when Amazon S3 is actively processing your current restore request\n for the object.

\n

If your bucket has a lifecycle configuration with a rule that includes an expiration\n action, the object expiration overrides the life span that you specify in a restore\n request. For example, if you restore an object copy for 10 days, but the object is\n scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days. For more information\n about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle Management in\n Amazon S3 User Guide.

\n

\n Responses\n

\n

A successful action returns either the 200 OK or 202\n Accepted status code.

\n
    \n
  • \n

    If the object is not previously restored, then Amazon S3 returns 202\n Accepted in the response.

    \n
  • \n
  • \n

    If the object is previously restored, Amazon S3 returns 200 OK in the\n response.

    \n
  • \n
\n

\n Special Errors\n

\n
    \n
  • \n
      \n
    • \n

      \n Code: RestoreAlreadyInProgress\n

      \n
    • \n
    • \n

      \n Cause: Object restore is already in progress. (This error does not\n apply to SELECT type requests.)\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 409 Conflict\n

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: GlacierExpeditedRetrievalNotAvailable\n

      \n
    • \n
    • \n

      \n Cause: expedited retrievals are currently not available. Try again\n later. (Returned if there is insufficient capacity to process the Expedited\n request. This error applies only to Expedited retrievals and not to\n S3 Standard or Bulk retrievals.)\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 503\n

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: N/A\n

      \n
    • \n
    \n
  • \n
\n \n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "POST", "uri": "/{Bucket}/{Key+}?restore&x-id=RestoreObject", @@ -11666,7 +12635,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name containing the object to restore.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name containing the object to restore.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11699,10 +12668,17 @@ "smithy.api#httpHeader": "x-amz-request-payer" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -11929,7 +12905,7 @@ "Start": { "target": "com.amazonaws.s3#Start", "traits": { - "smithy.api#documentation": "

Specifies the start of the byte range. This parameter is optional. Valid values:\n non-negative integers. The default value is 0. If only start is supplied, it means scan\n from that point to the end of the file.For example;\n 50 means scan\n from byte 50 until the end of the file.

" + "smithy.api#documentation": "

Specifies the start of the byte range. This parameter is optional. Valid values:\n non-negative integers. The default value is 0. If only start is supplied, it\n means scan from that point to the end of the file. For example,\n 50 means scan\n from byte 50 until the end of the file.

" } }, "End": { @@ -12033,21 +13009,21 @@ "SSECustomerAlgorithm": { "target": "com.amazonaws.s3#SSECustomerAlgorithm", "traits": { - "smithy.api#documentation": "

The SSE Algorithm used to encrypt the object. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.

", + "smithy.api#documentation": "

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created \n using a checksum algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.

", "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-algorithm" } }, "SSECustomerKey": { "target": "com.amazonaws.s3#SSECustomerKey", "traits": { - "smithy.api#documentation": "

The SSE Customer Key. For more information, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys.

", + "smithy.api#documentation": "

The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. \n For more information, see\n Protecting data using SSE-C keys in the\n Amazon S3 User Guide.

", "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key" } }, "SSECustomerKeyMD5": { "target": "com.amazonaws.s3#SSECustomerKeyMD5", "traits": { - "smithy.api#documentation": "

The SSE Customer Key MD5. For more information, see Server-Side Encryption\n (Using Customer-Provided Encryption Keys.

", + "smithy.api#documentation": "

The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum \n algorithm. For more information,\n see Protecting data using SSE-C keys in the\n Amazon S3 User Guide.

", "smithy.api#httpHeader": "x-amz-server-side-encryption-customer-key-MD5" } }, @@ -12094,7 +13070,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -12716,7 +13692,10 @@ "target": "com.amazonaws.s3#UploadPartOutput" }, "traits": { - "smithy.api#documentation": "

Uploads a part in a multipart upload.

\n \n

In this operation, you provide part data in your request. However, you have an option\n to specify your existing Amazon S3 object as a data source for the part you are uploading. To\n upload a part from an existing object, you use the UploadPartCopy operation.\n

\n
\n\n

You must initiate a multipart upload (see CreateMultipartUpload)\n before you can upload any part. In response to your initiate request, Amazon S3 returns an\n upload ID, a unique identifier, that you must include in your upload part request.

\n

Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely\n identifies a part and also defines its position within the object being created. If you\n upload a new part using the same part number that was used with a previous part, the\n previously uploaded part is overwritten. Each part must be at least 5 MB in size, except\n the last part. There is no size limit on the last part of your multipart upload.

\n

To ensure that data is not corrupted when traversing the network, specify the\n Content-MD5 header in the upload part request. Amazon S3 checks the part data\n against the provided MD5 value. If they do not match, Amazon S3 returns an error.

\n\n

If the upload request is signed with Signature Version 4, then Amazon Web Services S3 uses the\n x-amz-content-sha256 header as a checksum instead of\n Content-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version\n 4).

\n\n\n\n

\n Note: After you initiate multipart upload and upload\n one or more parts, you must either complete or abort multipart upload in order to stop\n getting charged for storage of the uploaded parts. Only after you either complete or abort\n multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts\n storage.

\n\n

For more information on multipart uploads, go to Multipart Upload Overview in the\n Amazon S3 User Guide .

\n

For information on the permissions required to use the multipart upload API, go to\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

\n\n

You can optionally request server-side encryption where Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it for you when you access it. You have\n the option of providing your own encryption key, or you can use the Amazon Web Services managed encryption\n keys. If you choose to provide your own encryption key, the request headers you provide in\n the request must match the headers you used in the request to initiate the upload by using\n CreateMultipartUpload. For more information, go to Using Server-Side Encryption in\n the Amazon S3 User Guide.

\n\n

Server-side encryption is supported by the S3 Multipart Upload actions. Unless you are\n using a customer-provided encryption key, you don't need to specify the encryption\n parameters in each UploadPart request. Instead, you only need to specify the server-side\n encryption parameters in the initial Initiate Multipart request. For more information, see\n CreateMultipartUpload.

\n\n

If you requested server-side encryption using a customer-provided encryption key in your\n initiate multipart upload request, you must provide identical encryption information in\n each part upload using the following headers.

\n\n\n
    \n
  • \n

    x-amz-server-side-encryption-customer-algorithm

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key-MD5

    \n
  • \n
\n\n

\n Special Errors\n

\n
    \n
  • \n
      \n
    • \n

      \n Code: NoSuchUpload\n

      \n
    • \n
    • \n

      \n Cause: The specified multipart upload does not exist. The upload\n ID might be invalid, or the multipart upload might have been aborted or\n completed.\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found \n

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client\n

      \n
    • \n
    \n
  • \n
\n\n \n\n\n\n\n

\n Related Resources\n

\n ", + "aws.protocols#httpChecksum": { + "requestAlgorithmMember": "ChecksumAlgorithm" + }, + "smithy.api#documentation": "

Uploads a part in a multipart upload.

\n \n

In this operation, you provide part data in your request. However, you have an option\n to specify your existing Amazon S3 object as a data source for the part you are uploading. To\n upload a part from an existing object, you use the UploadPartCopy operation.\n

\n
\n\n

You must initiate a multipart upload (see CreateMultipartUpload)\n before you can upload any part. In response to your initiate request, Amazon S3 returns an\n upload ID, a unique identifier, that you must include in your upload part request.

\n

Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely\n identifies a part and also defines its position within the object being created. If you\n upload a new part using the same part number that was used with a previous part, the\n previously uploaded part is overwritten.

\n

For information about maximum and minimum part sizes and other multipart upload specifications, see Multipart upload limits in the Amazon S3 User Guide.

\n

To ensure that data is not corrupted when traversing the network, specify the\n Content-MD5 header in the upload part request. Amazon S3 checks the part data\n against the provided MD5 value. If they do not match, Amazon S3 returns an error.

\n\n

If the upload request is signed with Signature Version 4, then Amazon Web Services S3 uses the\n x-amz-content-sha256 header as a checksum instead of\n Content-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version\n 4).

\n\n\n\n

\n Note: After you initiate multipart upload and upload\n one or more parts, you must either complete or abort multipart upload in order to stop\n getting charged for storage of the uploaded parts. Only after you either complete or abort\n multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts\n storage.

\n\n

For more information on multipart uploads, go to Multipart Upload Overview in the\n Amazon S3 User Guide .

\n

For information on the permissions required to use the multipart upload API, go to\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

\n\n

You can optionally request server-side encryption where Amazon S3 encrypts your data as it\n writes it to disks in its data centers and decrypts it for you when you access it. You have\n the option of providing your own encryption key, or you can use the Amazon Web Services managed encryption\n keys. If you choose to provide your own encryption key, the request headers you provide in\n the request must match the headers you used in the request to initiate the upload by using\n CreateMultipartUpload. For more information, go to Using Server-Side Encryption in\n the Amazon S3 User Guide.

\n\n

Server-side encryption is supported by the S3 Multipart Upload actions. Unless you are\n using a customer-provided encryption key, you don't need to specify the encryption\n parameters in each UploadPart request. Instead, you only need to specify the server-side\n encryption parameters in the initial Initiate Multipart request. For more information, see\n CreateMultipartUpload.

\n\n

If you requested server-side encryption using a customer-provided encryption key in your\n initiate multipart upload request, you must provide identical encryption information in\n each part upload using the following headers.

\n\n\n
    \n
  • \n

    x-amz-server-side-encryption-customer-algorithm

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key

    \n
  • \n
  • \n

    x-amz-server-side-encryption-customer-key-MD5

    \n
  • \n
\n\n

\n Special Errors\n

\n
    \n
  • \n
      \n
    • \n

      \n Code: NoSuchUpload\n

      \n
    • \n
    • \n

      \n Cause: The specified multipart upload does not exist. The upload\n ID might be invalid, or the multipart upload might have been aborted or\n completed.\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found \n

      \n
    • \n
    • \n

      \n SOAP Fault Code Prefix: Client\n

      \n
    • \n
    \n
  • \n
\n\n \n\n\n\n\n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}/{Key+}?x-id=UploadPart", @@ -12733,7 +13712,7 @@ "target": "com.amazonaws.s3#UploadPartCopyOutput" }, "traits": { - "smithy.api#documentation": "

Uploads a part by copying data from an existing object as data source. You specify the\n data source by adding the request header x-amz-copy-source in your request and\n a byte range by adding the request header x-amz-copy-source-range in your\n request.

\n

The minimum allowable part size for a multipart upload is 5 MB. For more information\n about multipart upload limits, go to Quick\n Facts in the Amazon S3 User Guide.

\n \n

Instead of using an existing object as part data, you might use the UploadPart\n action and provide data in your request.

\n
\n\n

You must initiate a multipart upload before you can upload any part. In response to your\n initiate request. Amazon S3 returns a unique identifier, the upload ID, that you must include in\n your upload part request.

\n

For more information about using the UploadPartCopy operation, see the\n following:

\n\n
    \n
  • \n

    For conceptual information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    For information about permissions required to use the multipart upload API, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    For information about copying objects using a single atomic action vs. the\n multipart upload, see Operations on\n Objects in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    For information about using server-side encryption with customer-provided\n encryption keys with the UploadPartCopy operation, see CopyObject and UploadPart.

    \n
  • \n
\n

Note the following additional considerations about the request headers\n x-amz-copy-source-if-match, x-amz-copy-source-if-none-match,\n x-amz-copy-source-if-unmodified-since, and\n x-amz-copy-source-if-modified-since:

\n

\n
    \n
  • \n

    \n Consideration 1 - If both of the\n x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the\n request as follows:

    \n

    \n x-amz-copy-source-if-match condition evaluates to true,\n and;

    \n

    \n x-amz-copy-source-if-unmodified-since condition evaluates to\n false;

    \n

    Amazon S3 returns 200 OK and copies the data.\n

    \n\n
  • \n
  • \n

    \n Consideration 2 - If both of the\n x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the\n request as follows:

    \n

    \n x-amz-copy-source-if-none-match condition evaluates to\n false, and;

    \n

    \n x-amz-copy-source-if-modified-since condition evaluates to\n true;

    \n

    Amazon S3 returns 412 Precondition Failed response code.\n

    \n
  • \n
\n

\n Versioning\n

\n

If your bucket has versioning enabled, you could have multiple versions of the same\n object. By default, x-amz-copy-source identifies the current version of the\n object to copy. If the current version is a delete marker and you don't specify a versionId\n in the x-amz-copy-source, Amazon S3 returns a 404 error, because the object does\n not exist. If you specify versionId in the x-amz-copy-source and the versionId\n is a delete marker, Amazon S3 returns an HTTP 400 error, because you are not allowed to specify\n a delete marker as a version for the x-amz-copy-source.

\n

You can optionally specify a specific version of the source object to copy by adding the\n versionId subresource as shown in the following example:

\n

\n x-amz-copy-source: /bucket/object?versionId=version id\n

\n\n

\n Special Errors\n

\n
    \n
  • \n
      \n
    • \n

      \n Code: NoSuchUpload\n

      \n
    • \n
    • \n

      \n Cause: The specified multipart upload does not exist. The upload\n ID might be invalid, or the multipart upload might have been aborted or\n completed.\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest\n

      \n
    • \n
    • \n

      \n Cause: The specified copy source is not supported as a byte-range\n copy source.\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request\n

      \n
    • \n
    \n
  • \n
\n\n \n\n\n\n\n

\n Related Resources\n

\n ", + "smithy.api#documentation": "

Uploads a part by copying data from an existing object as data source. You specify the\n data source by adding the request header x-amz-copy-source in your request and\n a byte range by adding the request header x-amz-copy-source-range in your\n request.

\n

For information about maximum and minimum part sizes and other multipart upload specifications, see Multipart upload limits in the Amazon S3 User Guide.

\n \n

Instead of using an existing object as part data, you might use the UploadPart\n action and provide data in your request.

\n
\n\n

You must initiate a multipart upload before you can upload any part. In response to your\n initiate request. Amazon S3 returns a unique identifier, the upload ID, that you must include in\n your upload part request.

\n

For more information about using the UploadPartCopy operation, see the\n following:

\n\n
    \n
  • \n

    For conceptual information about multipart uploads, see Uploading Objects Using Multipart\n Upload in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    For information about permissions required to use the multipart upload API, see\n Multipart Upload and\n Permissions in the Amazon S3 User Guide.

    \n
  • \n
  • \n

    For information about copying objects using a single atomic action vs. a multipart\n upload, see Operations on Objects in\n the Amazon S3 User Guide.

    \n
  • \n
  • \n

    For information about using server-side encryption with customer-provided\n encryption keys with the UploadPartCopy operation, see CopyObject and UploadPart.

    \n
  • \n
\n

Note the following additional considerations about the request headers\n x-amz-copy-source-if-match, x-amz-copy-source-if-none-match,\n x-amz-copy-source-if-unmodified-since, and\n x-amz-copy-source-if-modified-since:

\n

\n
    \n
  • \n

    \n Consideration 1 - If both of the\n x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the\n request as follows:

    \n

    \n x-amz-copy-source-if-match condition evaluates to true,\n and;

    \n

    \n x-amz-copy-source-if-unmodified-since condition evaluates to\n false;

    \n

    Amazon S3 returns 200 OK and copies the data.\n

    \n\n
  • \n
  • \n

    \n Consideration 2 - If both of the\n x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the\n request as follows:

    \n

    \n x-amz-copy-source-if-none-match condition evaluates to\n false, and;

    \n

    \n x-amz-copy-source-if-modified-since condition evaluates to\n true;

    \n

    Amazon S3 returns 412 Precondition Failed response code.\n

    \n
  • \n
\n

\n Versioning\n

\n

If your bucket has versioning enabled, you could have multiple versions of the same\n object. By default, x-amz-copy-source identifies the current version of the\n object to copy. If the current version is a delete marker and you don't specify a versionId\n in the x-amz-copy-source, Amazon S3 returns a 404 error, because the object does\n not exist. If you specify versionId in the x-amz-copy-source and the versionId\n is a delete marker, Amazon S3 returns an HTTP 400 error, because you are not allowed to specify\n a delete marker as a version for the x-amz-copy-source.

\n

You can optionally specify a specific version of the source object to copy by adding the\n versionId subresource as shown in the following example:

\n

\n x-amz-copy-source: /bucket/object?versionId=version id\n

\n\n

\n Special Errors\n

\n
    \n
  • \n
      \n
    • \n

      \n Code: NoSuchUpload\n

      \n
    • \n
    • \n

      \n Cause: The specified multipart upload does not exist. The upload\n ID might be invalid, or the multipart upload might have been aborted or\n completed.\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 404 Not Found\n

      \n
    • \n
    \n
  • \n
  • \n
      \n
    • \n

      \n Code: InvalidRequest\n

      \n
    • \n
    • \n

      \n Cause: The specified copy source is not supported as a byte-range\n copy source.\n

      \n
    • \n
    • \n

      \n HTTP Status Code: 400 Bad Request\n

      \n
    • \n
    \n
  • \n
\n\n \n\n\n\n\n

\n Related Resources\n

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}/{Key+}?x-id=UploadPartCopy", @@ -12807,7 +13786,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The bucket name.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The bucket name.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -12815,7 +13794,7 @@ "CopySource": { "target": "com.amazonaws.s3#CopySource", "traits": { - "smithy.api#documentation": "

Specifies the source object for the copy operation. You specify the value in one of two\n formats, depending on whether you want to access the source object through an access point:

\n
    \n
  • \n

    For objects not accessed through an access point, specify the name of the source\n bucket and key of the source object, separated by a slash (/). For example, to copy\n the object reports/january.pdf from the bucket\n awsexamplebucket, use\n awsexamplebucket/reports/january.pdf. The value must be URL\n encoded.

    \n
  • \n
  • \n

    For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:::accesspoint//object/. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

    \n \n

    Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same Amazon Web Services Region.

    \n
    \n

    Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:::outpost//object/. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL encoded.

    \n
  • \n
\n

To copy a specific version of an object, append ?versionId=\n to the value (for example,\n awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).\n If you don't specify a version ID, Amazon S3 copies the latest version of the source\n object.

", + "smithy.api#documentation": "

Specifies the source object for the copy operation. You specify the value in one of two\n formats, depending on whether you want to access the source object through an access point:

\n
    \n
  • \n

    For objects not accessed through an access point, specify the name of the source bucket\n and key of the source object, separated by a slash (/). For example, to copy the\n object reports/january.pdf from the bucket\n awsexamplebucket, use awsexamplebucket/reports/january.pdf.\n The value must be URL-encoded.

    \n
  • \n
  • \n

    For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:::accesspoint//object/. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

    \n \n

    Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same Amazon Web Services Region.

    \n
    \n

    Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:::outpost//object/. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

    \n
  • \n
\n

To copy a specific version of an object, append ?versionId=\n to the value (for example,\n awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).\n If you don't specify a version ID, Amazon S3 copies the latest version of the source\n object.

", "smithy.api#httpHeader": "x-amz-copy-source", "smithy.api#required": {} } @@ -12930,14 +13909,14 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected destination bucket owner. If the destination bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } }, "ExpectedSourceBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected source bucket owner. If the source bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-source-expected-bucket-owner" } } @@ -12960,6 +13939,34 @@ "smithy.api#httpHeader": "ETag" } }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32c" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha1" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded\n with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated\n with multipart uploads, see \n Checking object integrity in the Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha256" + } + }, "SSECustomerAlgorithm": { "target": "com.amazonaws.s3#SSECustomerAlgorithm", "traits": { @@ -13009,7 +14016,7 @@ "Bucket": { "target": "com.amazonaws.s3#BucketName", "traits": { - "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

", + "smithy.api#documentation": "

The name of the bucket to which the multipart upload was initiated.

\n

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

\n

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form \n AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -13028,6 +14035,41 @@ "smithy.api#httpHeader": "Content-MD5" } }, + "ChecksumAlgorithm": { + "target": "com.amazonaws.s3#ChecksumAlgorithm", + "traits": { + "smithy.api#documentation": "

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any\n additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or\n x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more\n information, see Checking object integrity in\n the Amazon S3 User Guide.

\n

If you provide an individual checksum, Amazon S3 ignores any provided\n ChecksumAlgorithm parameter.

\n

This checksum algorithm must be the same for all parts and it match the checksum\n value supplied in the CreateMultipartUpload request.

", + "smithy.api#httpHeader": "x-amz-sdk-checksum-algorithm" + } + }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 32-bit CRC32C checksum of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-crc32c" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha1" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent.\n This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see\n Checking object integrity in the\n Amazon S3 User Guide.

", + "smithy.api#httpHeader": "x-amz-checksum-sha256" + } + }, "Key": { "target": "com.amazonaws.s3#ObjectKey", "traits": { @@ -13082,7 +14124,7 @@ "ExpectedBucketOwner": { "target": "com.amazonaws.s3#AccountId", "traits": { - "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

", + "smithy.api#documentation": "

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

", "smithy.api#httpHeader": "x-amz-expected-bucket-owner" } } @@ -13213,14 +14255,14 @@ "StatusCode": { "target": "com.amazonaws.s3#GetObjectResponseStatusCode", "traits": { - "smithy.api#documentation": "

The integer status code for an HTTP response of a corresponding GetObject\n request.

\n

\n Status Codes\n

\n
    \n
  • \n

    \n 200 - OK\n

    \n
  • \n
  • \n

    \n 206 - Partial Content\n

    \n
  • \n
  • \n

    \n 304 - Not Modified\n

    \n
  • \n
  • \n

    \n 400 - Bad Request\n

    \n
  • \n
  • \n

    \n 401 - Unauthorized\n

    \n
  • \n
  • \n

    \n 403 - Forbidden\n

    \n
  • \n
  • \n

    \n 404 - Not Found\n

    \n
  • \n
  • \n

    \n 405 - Method Not Allowed\n

    \n
  • \n
  • \n

    \n 409 - Conflict\n

    \n
  • \n
  • \n

    \n 411 - Length Required\n

    \n
  • \n
  • \n

    \n 412 - Precondition Failed\n

    \n
  • \n
  • \n

    \n 416 - Range Not Satisfiable\n

    \n
  • \n
  • \n

    \n 500 - Internal Server Error\n

    \n
  • \n
  • \n

    \n 503 - Service Unavailable\n

    \n
  • \n
", + "smithy.api#documentation": "

The integer status code for an HTTP response of a corresponding GetObject\n request.

\n

\n Status Codes\n

\n
    \n
  • \n

    \n 200 - OK\n

    \n
  • \n
  • \n

    \n 206 - Partial Content\n

    \n
  • \n
  • \n

    \n 304 - Not Modified\n

    \n
  • \n
  • \n

    \n 400 - Bad Request\n

    \n
  • \n
  • \n

    \n 401 - Unauthorized\n

    \n
  • \n
  • \n

    \n 403 - Forbidden\n

    \n
  • \n
  • \n

    \n 404 - Not Found\n

    \n
  • \n
  • \n

    \n 405 - Method Not Allowed\n

    \n
  • \n
  • \n

    \n 409 - Conflict\n

    \n
  • \n
  • \n

    \n 411 - Length Required\n

    \n
  • \n
  • \n

    \n 412 - Precondition Failed\n

    \n
  • \n
  • \n

    \n 416 - Range Not Satisfiable\n

    \n
  • \n
  • \n

    \n 500 - Internal Server Error\n

    \n
  • \n
  • \n

    \n 503 - Service Unavailable\n

    \n
  • \n
", "smithy.api#httpHeader": "x-amz-fwd-status" } }, "ErrorCode": { "target": "com.amazonaws.s3#ErrorCode", "traits": { - "smithy.api#documentation": "

A string that uniquely identifies an error condition. Returned in the tag\n of the error XML response for a corresponding GetObject call. Cannot be used\n with a successful StatusCode header or when the transformed object is provided\n in the body. All error codes from S3 are sentence-cased. Regex value is \"^[A-Z][a-zA-Z]+$\".

", + "smithy.api#documentation": "

A string that uniquely identifies an error condition. Returned in the tag\n of the error XML response for a corresponding GetObject call. Cannot be used\n with a successful StatusCode header or when the transformed object is provided\n in the body. All error codes from S3 are sentence-cased. The regular expression (regex)\n value is \"^[A-Z][a-zA-Z]+$\".

", "smithy.api#httpHeader": "x-amz-fwd-error-code" } }, @@ -13287,6 +14329,34 @@ "smithy.api#httpHeader": "x-amz-fwd-header-Content-Type" } }, + "ChecksumCRC32": { + "target": "com.amazonaws.s3#ChecksumCRC32", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the\n same data that was originally sent. This specifies the base64-encoded, 32-bit CRC32 checksum\n of the object returned by the Object Lambda function. This may not match the checksum for the\n object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original\n GetObject request required checksum validation. For more information about checksums, see\n Checking\n object integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple\n checksum headers, this request will fail.

\n

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-crc32" + } + }, + "ChecksumCRC32C": { + "target": "com.amazonaws.s3#ChecksumCRC32C", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the\n same data that was originally sent. This specifies the base64-encoded, 32-bit CRC32C checksum\n of the object returned by the Object Lambda function. This may not match the checksum for the\n object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original\n GetObject request required checksum validation. For more information about checksums, see\n Checking\n object integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple\n checksum headers, this request will fail.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-crc32c" + } + }, + "ChecksumSHA1": { + "target": "com.amazonaws.s3#ChecksumSHA1", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the\n same data that was originally sent. This specifies the base64-encoded, 160-bit SHA-1 digest\n of the object returned by the Object Lambda function. This may not match the checksum for the\n object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original\n GetObject request required checksum validation. For more information about checksums, see\n Checking\n object integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple\n checksum headers, this request will fail.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-sha1" + } + }, + "ChecksumSHA256": { + "target": "com.amazonaws.s3#ChecksumSHA256", + "traits": { + "smithy.api#documentation": "

This header can be used as a data integrity check to verify that the data received is the\n same data that was originally sent. This specifies the base64-encoded, 256-bit SHA-256 digest\n of the object returned by the Object Lambda function. This may not match the checksum for the\n object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original\n GetObject request required checksum validation. For more information about checksums, see\n Checking\n object integrity in the Amazon S3 User Guide.

\n

Only one checksum header can be specified at a time. If you supply multiple\n checksum headers, this request will fail.

", + "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-checksum-sha256" + } + }, "DeleteMarker": { "target": "com.amazonaws.s3#DeleteMarker", "traits": { @@ -13311,7 +14381,7 @@ "Expiration": { "target": "com.amazonaws.s3#Expiration", "traits": { - "smithy.api#documentation": "

If object stored in Amazon S3 expiration is configured (see PUT Bucket lifecycle) it includes expiry-date and rule-id key-value pairs providing object expiration information. The value of the rule-id is URL encoded.

", + "smithy.api#documentation": "

If the object expiration is configured (see PUT Bucket lifecycle), the response\n includes this header. It includes the expiry-date and rule-id\n key-value pairs that provide the object expiration information. The value of the\n rule-id is URL-encoded.

", "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-expiration" } }, @@ -13415,7 +14485,7 @@ "StorageClass": { "target": "com.amazonaws.s3#StorageClass", "traits": { - "smithy.api#documentation": "

The class of storage used to store object in Amazon S3.

", + "smithy.api#documentation": "

Provides storage class information of the object. Amazon S3 returns this header for all\n objects except for S3 Standard storage class objects.

\n \n

For more information, see Storage\n Classes.

", "smithy.api#httpHeader": "x-amz-fwd-header-x-amz-storage-class" } }, diff --git a/aws/sdk/integration-tests/s3/Cargo.toml b/aws/sdk/integration-tests/s3/Cargo.toml index 0456e992e3..35ee810adf 100644 --- a/aws/sdk/integration-tests/s3/Cargo.toml +++ b/aws/sdk/integration-tests/s3/Cargo.toml @@ -18,8 +18,12 @@ aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } aws-smithy-protocol-test = { path = "../../build/aws-sdk/sdk/aws-smithy-protocol-test" } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } bytes = "1" +bytes-utils = "0.1.2" http = "0.2.3" +http-body = "0.4.5" +hyper = "0.14" serde_json = "1" +tempfile = "3" tokio = { version = "1", features = ["full", "test-util"] } tracing-subscriber = { version = "0.3.5", features = ["env-filter"] } tracing = "0.1" diff --git a/aws/sdk/integration-tests/s3/tests/checksums.rs b/aws/sdk/integration-tests/s3/tests/checksums.rs new file mode 100644 index 0000000000..e9ac3d8c1c --- /dev/null +++ b/aws/sdk/integration-tests/s3/tests/checksums.rs @@ -0,0 +1,349 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +use aws_http::user_agent::AwsUserAgent; +use aws_sdk_s3::{ + middleware::DefaultMiddleware, + model::ChecksumAlgorithm, + operation::{GetObject, PutObject}, + output::GetObjectOutput, + Credentials, Region, +}; +use aws_smithy_client::{ + test_connection::{capture_request, TestConnection}, + Client as CoreClient, +}; +use aws_smithy_http::body::SdkBody; +use http::{HeaderValue, Uri}; +use std::time::{Duration, UNIX_EPOCH}; + +// static INIT_LOGGER: std::sync::Once = std::sync::Once::new(); +// fn init_logger() { +// INIT_LOGGER.call_once(|| { +// tracing_subscriber::fmt::init(); +// }); +// } + +pub type Client = CoreClient; + +/// Test connection for the movies IT +/// headers are signed with actual creds, at some point we could replace them with verifiable test +/// credentials, but there are plenty of other tests that target signing +fn new_checksum_validated_response_test_connection( + checksum_header_name: &'static str, + checksum_header_value: &'static str, +) -> TestConnection<&'static str> { + TestConnection::new(vec![ + (http::Request::builder() + .header("x-amz-checksum-mode", "ENABLED") + .header("user-agent", "aws-sdk-rust/0.123.test os/windows/XPSP3 lang/rust/1.50.0") + .header("x-amz-date", "20210618T170728Z") + .header("x-amz-content-sha256", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + .header("x-amz-user-agent", "aws-sdk-rust/0.123.test api/test-service/0.123 os/windows/XPSP3 lang/rust/1.50.0") + .header("authorization", "AWS4-HMAC-SHA256 Credential=ANOTREAL/20210618/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-checksum-mode;x-amz-content-sha256;x-amz-date;x-amz-security-token;x-amz-user-agent, Signature=eb9e58fa4fb04c8e6f160705017fdbb497ccff0efee4227b3a56f900006c3882") + .uri(Uri::from_static("https://s3.us-east-1.amazonaws.com/some-test-bucket/test.txt?x-id=GetObject")).body(SdkBody::empty()).unwrap(), + http::Response::builder() + .header("x-amz-request-id", "4B4NGF0EAWN0GE63") + .header("content-length", "11") + .header("etag", "\"3e25960a79dbc69b674cd4ec67a72c62\"") + .header(checksum_header_name, checksum_header_value) + .header("content-type", "application/octet-stream") + .header("server", "AmazonS3") + .header("content-encoding", "") + .header("last-modified", "Tue, 21 Jun 2022 16:29:14 GMT") + .header("date", "Tue, 21 Jun 2022 16:29:23 GMT") + .header("x-amz-id-2", "kPl+IVVZAwsN8ePUyQJZ40WD9dzaqtr4eNESArqE68GSKtVvuvCTDe+SxhTT+JTUqXB1HL4OxNM=") + .header("accept-ranges", "bytes") + .status(http::StatusCode::from_u16(200).unwrap()) + .body(r#"Hello world"#).unwrap()), + ]) +} + +async fn test_checksum_on_streaming_response( + checksum_header_name: &'static str, + checksum_header_value: &'static str, +) -> GetObjectOutput { + let creds = Credentials::new( + "ANOTREAL", + "notrealrnrELgWzOk3IfjzDKtFBhDby", + Some("notarealsessiontoken".to_string()), + None, + "test", + ); + let conf = aws_sdk_s3::Config::builder() + .credentials_provider(creds) + .region(Region::new("us-east-1")) + .build(); + let conn = new_checksum_validated_response_test_connection( + checksum_header_name, + checksum_header_value, + ); + let client = Client::new(conn.clone()); + + let mut op = GetObject::builder() + .bucket("some-test-bucket") + .key("test.txt") + .checksum_mode(aws_sdk_s3::model::ChecksumMode::Enabled) + .build() + .unwrap() + .make_operation(&conf) + .await + .unwrap(); + op.properties_mut() + .insert(UNIX_EPOCH + Duration::from_secs(1624036048)); + op.properties_mut().insert(AwsUserAgent::for_tests()); + + let res = client.call(op).await.unwrap(); + + conn.assert_requests_match(&[http::header::HeaderName::from_static("x-amz-checksum-mode")]); + + res +} + +#[tokio::test] +async fn test_crc32_checksum_on_streaming_response() { + let res = test_checksum_on_streaming_response("x-amz-checksum-crc32", "i9aeUg==").await; + + // Header checksums are base64 encoded + assert_eq!(res.checksum_crc32(), Some("i9aeUg==")); + let body = collect_body_into_string(res.body.into_inner()).await; + + assert_eq!(body, "Hello world"); +} + +#[tokio::test] +async fn test_crc32c_checksum_on_streaming_response() { + let res = test_checksum_on_streaming_response("x-amz-checksum-crc32c", "crUfeA==").await; + + // Header checksums are base64 encoded + assert_eq!(res.checksum_crc32_c(), Some("crUfeA==")); + let body = collect_body_into_string(res.body.into_inner()).await; + + assert_eq!(body, "Hello world"); +} + +#[tokio::test] +async fn test_sha1_checksum_on_streaming_response() { + let res = + test_checksum_on_streaming_response("x-amz-checksum-sha1", "e1AsOh9IyGCa4hLN+2Od7jlnP14=") + .await; + + // Header checksums are base64 encoded + assert_eq!(res.checksum_sha1(), Some("e1AsOh9IyGCa4hLN+2Od7jlnP14=")); + let body = collect_body_into_string(res.body.into_inner()).await; + + assert_eq!(body, "Hello world"); +} + +#[tokio::test] +async fn test_sha256_checksum_on_streaming_response() { + let res = test_checksum_on_streaming_response( + "x-amz-checksum-sha256", + "ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=", + ) + .await; + + // Header checksums are base64 encoded + assert_eq!( + res.checksum_sha256(), + Some("ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=") + ); + let body = collect_body_into_string(res.body.into_inner()).await; + + assert_eq!(body, "Hello world"); +} + +// The test structure is identical for all supported checksum algorithms +async fn test_checksum_on_streaming_request<'a>( + body: &'static [u8], + checksum_algorithm: ChecksumAlgorithm, + checksum_header_name: &'static str, + expected_decoded_content_length: &'a str, + expected_encoded_content_length: &'a str, + expected_aws_chunked_encoded_body: &'a str, +) { + let creds = aws_sdk_s3::Credentials::new( + "ANOTREAL", + "notrealrnrELgWzOk3IfjzDKtFBhDby", + Some("notarealsessiontoken".to_string()), + None, + "test", + ); + let conf = aws_sdk_s3::Config::builder() + .credentials_provider(creds) + .region(aws_sdk_s3::Region::new("us-east-1")) + .build(); + let (conn, rcvr) = capture_request(None); + + let client: aws_smithy_client::Client<_, aws_sdk_s3::middleware::DefaultMiddleware> = + aws_smithy_client::Client::new(conn.clone()); + + // ByteStreams created from a file are streaming and have a known size + let mut file = tempfile::NamedTempFile::new().unwrap(); + use std::io::Write; + file.write_all(body).unwrap(); + + let body = aws_sdk_s3::types::ByteStream::read_from() + .path(file.path()) + .buffer_size(1024) + .build() + .await + .unwrap(); + + let mut op = PutObject::builder() + .bucket("test-bucket") + .key("test.txt") + .body(body) + .checksum_algorithm(checksum_algorithm) + .build() + .unwrap() + .make_operation(&conf) + .await + .expect("failed to construct operation"); + op.properties_mut() + .insert(UNIX_EPOCH + Duration::from_secs(1624036048)); + op.properties_mut().insert(AwsUserAgent::for_tests()); + + // The response from the fake connection won't return the expected XML but we don't care about + // that error in this test + let _ = client.call(op).await; + let req = rcvr.expect_request(); + + let headers = req.headers(); + let x_amz_content_sha256 = headers + .get("x-amz-content-sha256") + .expect("x-amz-content-sha256 header exists"); + let x_amz_trailer = headers + .get("x-amz-trailer") + .expect("x-amz-trailer header exists"); + let x_amz_decoded_content_length = headers + .get("x-amz-decoded-content-length") + .expect("x-amz-decoded-content-length header exists"); + let content_length = headers + .get("Content-Length") + .expect("Content-Length header exists"); + let content_encoding = headers + .get("Content-Encoding") + .expect("Content-Encoding header exists"); + + assert_eq!( + HeaderValue::from_static("STREAMING-UNSIGNED-PAYLOAD-TRAILER"), + x_amz_content_sha256, + "signing header is incorrect" + ); + assert_eq!( + HeaderValue::from_static(checksum_header_name), + x_amz_trailer, + "x-amz-trailer is incorrect" + ); + assert_eq!( + HeaderValue::from_static(aws_http::content_encoding::header_value::AWS_CHUNKED), + content_encoding, + "content-encoding wasn't set to aws-chunked" + ); + + // The length of the string "Hello world" + assert_eq!( + HeaderValue::from_str(expected_decoded_content_length).unwrap(), + x_amz_decoded_content_length, + "decoded content length was wrong" + ); + // The sum of the length of the original body, chunk markers, and trailers + assert_eq!( + HeaderValue::from_str(expected_encoded_content_length).unwrap(), + content_length, + "content-length was expected to be {} but was {} instead", + expected_encoded_content_length, + content_length.to_str().unwrap() + ); + + let body = collect_body_into_string(req.into_body()).await; + // When sending a streaming body with a checksum, the trailers are included as part of the body content + assert_eq!(body.as_str(), expected_aws_chunked_encoded_body,); +} + +#[tokio::test] +async fn test_crc32_checksum_on_streaming_request() { + let expected_aws_chunked_encoded_body = + "B\r\nHello world\r\n0\r\nx-amz-checksum-crc32:i9aeUg==\r\n\r\n"; + let expected_encoded_content_length = format!("{}", expected_aws_chunked_encoded_body.len()); + test_checksum_on_streaming_request( + b"Hello world", + ChecksumAlgorithm::Crc32, + "x-amz-checksum-crc32", + "11", + &expected_encoded_content_length, + expected_aws_chunked_encoded_body, + ) + .await +} + +// This test isn't a duplicate. It tests CRC32C (note the C) checksum request validation +#[tokio::test] +async fn test_crc32c_checksum_on_streaming_request() { + let expected_aws_chunked_encoded_body = + "B\r\nHello world\r\n0\r\nx-amz-checksum-crc32c:crUfeA==\r\n\r\n"; + let expected_encoded_content_length = format!("{}", expected_aws_chunked_encoded_body.len()); + test_checksum_on_streaming_request( + b"Hello world", + ChecksumAlgorithm::Crc32C, + "x-amz-checksum-crc32c", + "11", + &expected_encoded_content_length, + expected_aws_chunked_encoded_body, + ) + .await +} + +#[tokio::test] +async fn test_sha1_checksum_on_streaming_request() { + let expected_aws_chunked_encoded_body = + "B\r\nHello world\r\n0\r\nx-amz-checksum-sha1:e1AsOh9IyGCa4hLN+2Od7jlnP14=\r\n\r\n"; + let expected_encoded_content_length = format!("{}", expected_aws_chunked_encoded_body.len()); + test_checksum_on_streaming_request( + b"Hello world", + ChecksumAlgorithm::Sha1, + "x-amz-checksum-sha1", + "11", + &expected_encoded_content_length, + expected_aws_chunked_encoded_body, + ) + .await +} + +#[tokio::test] +async fn test_sha256_checksum_on_streaming_request() { + let expected_aws_chunked_encoded_body = "B\r\nHello world\r\n0\r\nx-amz-checksum-sha256:ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=\r\n\r\n"; + let expected_encoded_content_length = format!("{}", expected_aws_chunked_encoded_body.len()); + test_checksum_on_streaming_request( + b"Hello world", + ChecksumAlgorithm::Sha256, + "x-amz-checksum-sha256", + "11", + &expected_encoded_content_length, + expected_aws_chunked_encoded_body, + ) + .await +} + +async fn collect_body_into_string(mut body: aws_smithy_http::body::SdkBody) -> String { + use bytes::Buf; + use bytes_utils::SegmentedBuf; + use http_body::Body; + use std::io::Read; + + let mut output = SegmentedBuf::new(); + while let Some(buf) = body.data().await { + output.push(buf.unwrap()); + } + + let mut output_text = String::new(); + output + .reader() + .read_to_string(&mut output_text) + .expect("Doesn't cause IO errors"); + + output_text +} diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt index 2cdfed41f6..f790bbe46f 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt @@ -43,6 +43,7 @@ import software.amazon.smithy.rust.codegen.server.smithy.generators.http.ServerR import software.amazon.smithy.rust.codegen.server.smithy.generators.http.ServerResponseBindingGenerator import software.amazon.smithy.rust.codegen.smithy.RuntimeType import software.amazon.smithy.rust.codegen.smithy.ServerCodegenContext +import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.extractSymbolFromOption import software.amazon.smithy.rust.codegen.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator @@ -137,7 +138,7 @@ private class ServerHttpBoundProtocolTraitImplGenerator( "http" to RuntimeType.http ) - override fun generateTraitImpls(operationWriter: RustWriter, operationShape: OperationShape) { + override fun generateTraitImpls(operationWriter: RustWriter, operationShape: OperationShape, customizations: List) { val inputSymbol = symbolProvider.toSymbol(operationShape.inputShape(model)) val outputSymbol = symbolProvider.toSymbol(operationShape.outputShape(model)) @@ -473,7 +474,7 @@ private class ServerHttpBoundProtocolTraitImplGenerator( } } val status = - variantShape.getTrait()?.let { trait -> trait.code } + variantShape.getTrait()?.code ?: errorTrait.defaultHttpStatusCode serverRenderContentLengthHeader() diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt index 16e27202ae..1f4a13a321 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/CargoDependency.kt @@ -204,13 +204,14 @@ data class CargoDependency( val PrettyAssertions: CargoDependency = CargoDependency("pretty_assertions", CratesIo("1"), scope = DependencyScope.Dev) val Regex: CargoDependency = CargoDependency("regex", CratesIo("1")) val Ring: CargoDependency = CargoDependency("ring", CratesIo("0.16")) - val TempFile: CargoDependency = CargoDependency("temp-file", CratesIo("0.1.6"), scope = DependencyScope.Dev) + val TempFile: CargoDependency = CargoDependency("tempfile", CratesIo("3.2.0"), scope = DependencyScope.Dev) val TokioStream: CargoDependency = CargoDependency("tokio-stream", CratesIo("0.1.7")) val Tower: CargoDependency = CargoDependency("tower", CratesIo("0.4")) val Tracing: CargoDependency = CargoDependency("tracing", CratesIo("0.1")) fun SmithyTypes(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("types") fun SmithyClient(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("client") + fun SmithyChecksums(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("checksums") fun SmithyAsync(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("async") fun SmithyEventStream(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("eventstream") fun SmithyHttp(runtimeConfig: RuntimeConfig) = runtimeConfig.runtimeCrate("http") diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/OperationCustomization.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/OperationCustomization.kt index 24aedbd92f..58ceed0ecc 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/OperationCustomization.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/customize/OperationCustomization.kt @@ -48,6 +48,11 @@ sealed class OperationSection(name: String) : Section(name) { val operation: String, val config: String ) : OperationSection("Finalize") + + data class MutateOutput( + override val customizations: List, + val operationShape: OperationShape, + ) : OperationSection("MutateOutput") } abstract class OperationCustomization : NamedSectionGenerator() { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt index e75f44610f..8d8d98505e 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/http/HttpBindingGenerator.kt @@ -64,7 +64,7 @@ import software.amazon.smithy.rust.codegen.util.toSnakeCase * - serializing data to an HTTP request (we are a client), * - serializing data to an HTTP response (we are a server), */ -public enum class HttpMessageType { +enum class HttpMessageType { REQUEST, RESPONSE } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/MakeOperationGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/MakeOperationGenerator.kt index b9c6acda63..adc45c4d74 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/MakeOperationGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/MakeOperationGenerator.kt @@ -151,7 +151,7 @@ open class MakeOperationGenerator( writer.format(symbolProvider.toSymbol(shape)) private fun buildOperationTypeRetry(writer: RustWriter, customizations: List): String = - customizations.mapNotNull { it.retryType() }.firstOrNull()?.let { writer.format(it) } ?: "()" + customizations.firstNotNullOfOrNull { it.retryType() }?.let { writer.format(it) } ?: "()" private fun needsContentLength(operationShape: OperationShape): Boolean { return protocol.httpBindingResolver.requestBindings(operationShape) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolGenerator.kt index 94f9b76575..8b614da14f 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolGenerator.kt @@ -70,7 +70,7 @@ interface ProtocolPayloadGenerator { * must have the complete body to return a result. */ interface ProtocolTraitImplGenerator { - fun generateTraitImpls(operationWriter: RustWriter, operationShape: OperationShape) + fun generateTraitImpls(operationWriter: RustWriter, operationShape: OperationShape, customizations: List) } /** @@ -158,7 +158,7 @@ open class ProtocolGenerator( writeCustomizations(customizations, OperationSection.OperationImplBlock(customizations)) } - traitGenerator.generateTraitImpls(operationWriter, operationShape) + traitGenerator.generateTraitImpls(operationWriter, operationShape, customizations) } /** @@ -169,7 +169,7 @@ open class ProtocolGenerator( operationWriter: RustWriter, operationShape: OperationShape, ) { - traitGenerator.generateTraitImpls(operationWriter, operationShape) + traitGenerator.generateTraitImpls(operationWriter, operationShape, emptyList()) } private fun renderTypeAliases( @@ -179,8 +179,8 @@ open class ProtocolGenerator( inputShape: StructureShape ) { // TODO(https://github.com/awslabs/smithy-rs/issues/976): Callers should be able to invoke - // buildOperationType* directly to get the type rather than depending on these aliases. - // These are used in fluent clients. + // buildOperationType* directly to get the type rather than depending on these aliases. + // These are used in fluent clients. val operationTypeOutput = buildOperationTypeOutput(inputWriter, operationShape) val operationTypeRetry = buildOperationTypeRetry(inputWriter, customizations) val inputPrefix = symbolProvider.toSymbol(inputShape).name @@ -197,5 +197,5 @@ open class ProtocolGenerator( writer.format(symbolProvider.toSymbol(shape)) private fun buildOperationTypeRetry(writer: RustWriter, customizations: List): String = - customizations.mapNotNull { it.retryType() }.firstOrNull()?.let { writer.format(it) } ?: "()" + customizations.firstNotNullOfOrNull { it.retryType() }?.let { writer.format(it) } ?: "()" } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolGenerator.kt index 17c72b8232..b9cdb2250e 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/HttpBoundProtocolGenerator.kt @@ -22,6 +22,9 @@ import software.amazon.smithy.rust.codegen.rustlang.withBlock import software.amazon.smithy.rust.codegen.rustlang.writable import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType +import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization +import software.amazon.smithy.rust.codegen.smithy.customize.OperationSection +import software.amazon.smithy.rust.codegen.smithy.customize.writeCustomizations import software.amazon.smithy.rust.codegen.smithy.generators.StructureGenerator import software.amazon.smithy.rust.codegen.smithy.generators.builderSymbol import software.amazon.smithy.rust.codegen.smithy.generators.error.errorSymbol @@ -75,7 +78,11 @@ class HttpBoundProtocolTraitImplGenerator( "Bytes" to RuntimeType.Bytes, ) - override fun generateTraitImpls(operationWriter: RustWriter, operationShape: OperationShape) { + override fun generateTraitImpls( + operationWriter: RustWriter, + operationShape: OperationShape, + customizations: List + ) { val outputSymbol = symbolProvider.toSymbol(operationShape.outputShape(model)) val operationName = symbolProvider.toSymbol(operationShape).name @@ -84,11 +91,11 @@ class HttpBoundProtocolTraitImplGenerator( // if an error occurred or if the streaming parser indicates that it needs the full data to proceed. if (operationShape.outputShape(model).hasStreamingMember(model)) { with(operationWriter) { - renderStreamingTraits(operationName, outputSymbol, operationShape) + renderStreamingTraits(operationName, outputSymbol, operationShape, customizations) } } else { with(operationWriter) { - renderNonStreamingTraits(operationName, outputSymbol, operationShape) + renderNonStreamingTraits(operationName, outputSymbol, operationShape, customizations) } } } @@ -96,7 +103,8 @@ class HttpBoundProtocolTraitImplGenerator( private fun RustWriter.renderNonStreamingTraits( operationName: String?, outputSymbol: Symbol, - operationShape: OperationShape + operationShape: OperationShape, + customizations: List ) { val successCode = httpBindingResolver.httpTrait(operationShape).code rustTemplate( @@ -115,14 +123,15 @@ class HttpBoundProtocolTraitImplGenerator( "O" to outputSymbol, "E" to operationShape.errorSymbol(model, symbolProvider, coreCodegenContext.target), "parse_error" to parseError(operationShape), - "parse_response" to parseResponse(operationShape) + "parse_response" to parseResponse(operationShape, customizations) ) } private fun RustWriter.renderStreamingTraits( operationName: String, outputSymbol: Symbol, - operationShape: OperationShape + operationShape: OperationShape, + customizations: List ) { val successCode = httpBindingResolver.httpTrait(operationShape).code rustTemplate( @@ -144,7 +153,7 @@ class HttpBoundProtocolTraitImplGenerator( """, "O" to outputSymbol, "E" to operationShape.errorSymbol(model, symbolProvider, coreCodegenContext.target), - "parse_streaming_response" to parseStreamingResponse(operationShape), + "parse_streaming_response" to parseStreamingResponse(operationShape, customizations), "parse_error" to parseError(operationShape), *codegenScope ) @@ -198,7 +207,8 @@ class HttpBoundProtocolTraitImplGenerator( operationShape, errorShape, httpBindingResolver.errorResponseBindings(errorShape), - errorSymbol + errorSymbol, + listOf(), ) } } @@ -223,7 +233,7 @@ class HttpBoundProtocolTraitImplGenerator( } } - private fun parseStreamingResponse(operationShape: OperationShape): RuntimeType { + private fun parseStreamingResponse(operationShape: OperationShape, customizations: List): RuntimeType { val fnName = "parse_${operationShape.id.name.toSnakeCase()}" val outputShape = operationShape.outputShape(model) val outputSymbol = symbolProvider.toSymbol(outputShape) @@ -236,20 +246,23 @@ class HttpBoundProtocolTraitImplGenerator( "O" to outputSymbol, "E" to errorSymbol ) { - write("let response = op_response.http_mut();") + // Not all implementations will use the property bag, but some will + Attribute.Custom("allow(unused_variables)").render(it) + rust("let (response, properties) = op_response.parts_mut();") withBlock("Ok({", "})") { renderShapeParser( operationShape, outputShape, httpBindingResolver.responseBindings(operationShape), - errorSymbol + errorSymbol, + customizations ) } } } } - private fun parseResponse(operationShape: OperationShape): RuntimeType { + private fun parseResponse(operationShape: OperationShape, customizations: List): RuntimeType { val fnName = "parse_${operationShape.id.name.toSnakeCase()}_response" val outputShape = operationShape.outputShape(model) val outputSymbol = symbolProvider.toSymbol(outputShape) @@ -267,7 +280,8 @@ class HttpBoundProtocolTraitImplGenerator( operationShape, outputShape, httpBindingResolver.responseBindings(operationShape), - errorSymbol + errorSymbol, + customizations ) } } @@ -279,6 +293,7 @@ class HttpBoundProtocolTraitImplGenerator( outputShape: StructureShape, bindings: List, errorSymbol: RuntimeType, + customizations: List ) { val httpBindingGenerator = ResponseBindingGenerator(protocol, coreCodegenContext, operationShape) val structuredDataParser = protocol.structuredDataParser(operationShape) @@ -316,6 +331,9 @@ class HttpBoundProtocolTraitImplGenerator( val err = if (StructureGenerator.fallibleBuilder(outputShape, symbolProvider)) { ".map_err(${format(errorSymbol)}::unhandled)?" } else "" + + writeCustomizations(customizations, OperationSection.MutateOutput(customizations, operationShape)) + rust("output.build()$err") } diff --git a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGeneratorTest.kt b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGeneratorTest.kt index 0ec857e492..98c0591a6c 100644 --- a/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGeneratorTest.kt +++ b/codegen/src/test/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/protocol/ProtocolTestGeneratorTest.kt @@ -19,6 +19,7 @@ import software.amazon.smithy.rust.codegen.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.smithy.CodegenVisitor import software.amazon.smithy.rust.codegen.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.smithy.RuntimeType +import software.amazon.smithy.rust.codegen.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.smithy.generators.error.errorSymbol import software.amazon.smithy.rust.codegen.smithy.protocols.Protocol @@ -44,11 +45,11 @@ private class TestProtocolPayloadGenerator(private val body: String) : ProtocolP private class TestProtocolTraitImplGenerator( private val coreCodegenContext: CoreCodegenContext, - private val correctResponse: String + private val correctResponse: String, ) : ProtocolTraitImplGenerator { private val symbolProvider = coreCodegenContext.symbolProvider - override fun generateTraitImpls(operationWriter: RustWriter, operationShape: OperationShape) { + override fun generateTraitImpls(operationWriter: RustWriter, operationShape: OperationShape, customizations: List) { operationWriter.rustTemplate( """ impl #{parse_strict} for ${operationShape.id.name}{ diff --git a/rust-runtime/aws-smithy-checksums/src/body/calculate.rs b/rust-runtime/aws-smithy-checksums/src/body/calculate.rs index 74698ff24e..746ee04cd3 100644 --- a/rust-runtime/aws-smithy-checksums/src/body/calculate.rs +++ b/rust-runtime/aws-smithy-checksums/src/body/calculate.rs @@ -98,8 +98,7 @@ impl http_body::Body for ChecksumBody { #[cfg(test)] mod tests { use super::ChecksumBody; - use crate::http::new_from_algorithm; - use crate::http::{CRC_32_HEADER_NAME, CRC_32_NAME}; + use crate::{http::CRC_32_HEADER_NAME, ChecksumAlgorithm, CRC_32_NAME}; use aws_smithy_http::body::SdkBody; use aws_smithy_types::base64; use bytes::Buf; @@ -121,7 +120,10 @@ mod tests { async fn test_checksum_body() { let input_text = "This is some test text for an SdkBody"; let body = SdkBody::from(input_text); - let checksum = new_from_algorithm(CRC_32_NAME).unwrap(); + let checksum = CRC_32_NAME + .parse::() + .unwrap() + .into_impl(); let mut body = ChecksumBody::new(body, checksum); let mut output = SegmentedBuf::new(); diff --git a/rust-runtime/aws-smithy-checksums/src/body/validate.rs b/rust-runtime/aws-smithy-checksums/src/body/validate.rs index 278782f4df..5af263bf02 100644 --- a/rust-runtime/aws-smithy-checksums/src/body/validate.rs +++ b/rust-runtime/aws-smithy-checksums/src/body/validate.rs @@ -37,12 +37,12 @@ impl ChecksumBody { body: SdkBody, checksum: Box, precalculated_checksum: Bytes, - ) -> Result> { - Ok(Self { + ) -> Self { + Self { inner: body, checksum: Some(checksum), precalculated_checksum, - }) + } } fn poll_inner( @@ -154,7 +154,7 @@ impl http_body::Body for ChecksumBody { #[cfg(test)] mod tests { use crate::body::validate::{ChecksumBody, Error}; - use crate::http::new_from_algorithm; + use crate::ChecksumAlgorithm; use aws_smithy_http::body::SdkBody; use bytes::{Buf, Bytes}; use bytes_utils::SegmentedBuf; @@ -174,10 +174,9 @@ mod tests { let non_matching_checksum = Bytes::copy_from_slice(&[0x00, 0x00, 0x00, 0x00]); let mut body = ChecksumBody::new( body, - new_from_algorithm("crc32").unwrap(), + "crc32".parse::().unwrap().into_impl(), non_matching_checksum.clone(), - ) - .unwrap(); + ); while let Some(data) = body.data().await { match data { @@ -203,8 +202,8 @@ mod tests { let input_text = "This is some test text for an SdkBody"; let actual_checksum = calculate_crc32_checksum(input_text); let body = SdkBody::from(input_text); - let mut body = - ChecksumBody::new(body, new_from_algorithm("crc32").unwrap(), actual_checksum).unwrap(); + let http_checksum = "crc32".parse::().unwrap().into_impl(); + let mut body = ChecksumBody::new(body, http_checksum, actual_checksum); let mut output = SegmentedBuf::new(); while let Some(buf) = body.data().await { diff --git a/rust-runtime/aws-smithy-checksums/src/http.rs b/rust-runtime/aws-smithy-checksums/src/http.rs index 684dd5858c419d70768a29abb95f904a16a5b254..ba29b8ceda3d0ee822c1acc10e087ee4ced77b1d 100644 GIT binary patch delta 1435 zcmewwzuRuY4tXvGAaKq|P0lVZ&DDXk9COn1i!w_xChk|Bd|FPH1*B~9d{Idz9j?i2 zj4_*4n4U3CHf9OhtS@qmHLfJTBr!*!II}8MAwLalqQ1Vqg04bHMyf)BM`~h9YLQ=J zZfXLWR0dc^ArB~}UzV6tnyOHoT98nQEK3Nit6u^994fbDYajHTxFa}ettg2x$usE80O3s|U7NTx47o*(da(S`IhZGbiUy!#< zat?BiH#Um*bM$pZ2`D{af+z->h9$-|G*MNS=9L#E7NCn}=9T2fgA&f%bvd0nD%`tIewJ3j@kic-~i<*6tO{6Hm^IG9Oy zqB{L<55so0wsv;D5r-4y{+7agqrioQ~hWendkb47G_b_A{iPe25E$1=Q(6EK;I2out++1wE>HkpaTlS6y2Z@)QsePoI4G)u%Y z(Qs*ljqg^69j+Vb)<&KlAK1G~!%_%mWe^0lIt({4kQt|$%mUXe@c8K9<kZR=?`1<8=$quI8P+N-`m}`qh-ebEk^bDS%LuBSv zF399BfcY718}1{z#9d=EqQFfXL$Y}iiEILo5GUG6cr^T?G{6f8aEIlVO=Px)OqVU& z2WJCFJB#fJquM5DHn#*mhQD15)7WfpwM6GRxxjgteP8lzix=_r_uc|>CZD5{B!;&* zqMzr_#b>4&_-n{^)dxGcjN(MuGIfK%cHw-Q6`#<`XVa?Q{$`$3l+bm$%m?`L+B?_q4=p1*#9h$@sW6yq2*0wcHGfmN+dzW-S+OAEaSeOcR!5 zS&_PGviVrn&(UvDd=(w$q2$0AuC`Q~MW0oR?ZU7zPkGH&n{9)JwTzu?-H@}X;IK62 zyP}a`BVr%O1mp_9Fm;KD4v0U_{Rct4Kwt%Qgu!Cs5&|p3fWdN=btqO@+!c%!4&vFf zHSumO1Sw!|#N2w4H5{!anxk+Nl$Xe^Af`^Ug0wpjT!O_a$pTWhB)WuvI>7=pRbqF- zLunBk08tUz?I3ZOC?uRPT!2tq7{`8$M9^UH`GufF2iaeN$e1;gEifQc4Lv^l$E|N}gY!z_9Vr^WkD1Y0Te-NBZ6+nYi-o3b8{bpT?I;Y`z?4;`SDPk3WROug&_~Yt$<&J z6N194>~SiPXr_S^Dv`w~!89Zyff-z+UBRGZxO|u`WtTBRKpJFoq^hWDRx?)=i}?rS ze<3i0fupFfLy9^HJa8dWj4IAvK~e`4(Cq1cS!sn?_sA zLWOi*%w$S=5T|jKF`PFw^IE^17yT}#HMrW;zW{op)p)di&xIIQR;c}|S?^8l`C8qS zmeZ^R%>O<07z+?u3LL+MHpKP)46T{9&!9^d{PIJs-c654<4A5d>Aa$yu0-o9OPY0M zlhW&VO7-ijo5D4$RI61dkyi-6Ot?_j1vjjDf}|cH0k|=;>Y)8VZ9lIq5Edr#qmCI= zu#{0muR9fUATy+K$c8+)c*O}(E^TU7&^>`}fGb0H9wI`NZM3dViIj>IIs623%JPN8{OY!5z# zW1v}&PRa7_-SN@kkEcJswhw;#;qA$*_s6eK?N@K?cPFpt-+%14Cuo{k;*7c+--*Gw zc*bf!%PV}Hzo3&@HUZJYEE;(F+N1;L+#lL0+o%Qn;a!kmlAFU0KT_wB5?GRBfX>S$ zoaurJG~AV4flxAc(Q4&#jRJ%sZ;8LO%|r$ni^@fAYdT6$xKXt*T8R_WgyK2e!3|&| z@chulx8igWxrOt^O0YIVgICK;Vjq1WTDM2akXQrq4388}9iwYRdFqpD2G#uADrEpp z6^1&0MWTsT5P?J#b#z#R#KTjm zo1is^X;+g)N#Do_5eViKgxo6!DiLsV6f`MhTHG`uZ>-~Nv7o%M#O>s2bPN?D8$z@u zVo&9)=)R&Ot(ykuuNkjj4(kSJrzaV6?dG?++0|-u@HY2gI&*3z!O&KT@GbZRdP2KD zDf@BN4xCme?67F*Y11mDZ*nW9RLDek-#8iJtV2uV4SEatYL<8!Ay?dkR;+H{cU0uY zWJ>wkSeO?}EcJdj>w+g$G8<9=+}{LZr%7G7Fo5k7L{>^&ubXEU?eL_ztyhKCATO)A zO=Qlx-SfNxGUD#4>zQ)1WNSj96L1gQN=kltVUJ<>zp^BO|614zlLe86K8s|zsHtJ{ChE7>C@eTBZB|Ec~atV5AmXkz86bsCVY|IqchjP zY{IZJ)V^qT3A#*kUS!TV7v@ve!cbS6UN~#5G~$ZP=}w81&dPC6OE4k6`3W;M+;GNQ zq*Y5tLv0gyDRkCa))i8lkCP2E_K24Cf;@V;1kGDJNXuFYevi&bR_DB8z>NOb#(QaJ zXUD$HC#`?1Vw3Kd$?1 z>7or3nx|E5Y@$R)hGMG^-!y9s+M+_Q7T~@l686h~ibN0_-orb?neFu{ zzEYAnogv>w!cU1I0;$Bi6Q5KPg0#blc=-1%8Sl=P*3n0YPHG02?z%e7p$?2rC6b`#KhzDo>MK~cloSEELV|KE&Su3;AH7#G% Y{L_W~RW`X=YTr`Es}t{Ihc{dQ1?lJmp8x;= diff --git a/rust-runtime/aws-smithy-checksums/src/lib.rs b/rust-runtime/aws-smithy-checksums/src/lib.rs index d8634dc414..98ed65d34c 100644 --- a/rust-runtime/aws-smithy-checksums/src/lib.rs +++ b/rust-runtime/aws-smithy-checksums/src/lib.rs @@ -6,10 +6,103 @@ //! Checksum calculation and verification callbacks. use bytes::Bytes; +use std::str::FromStr; pub mod body; pub mod http; +// Valid checksum algorithm names +pub const CRC_32_NAME: &str = "crc32"; +pub const CRC_32_C_NAME: &str = "crc32c"; +pub const SHA_1_NAME: &str = "sha1"; +pub const SHA_256_NAME: &str = "sha256"; +pub const MD5_NAME: &str = "md5"; + +/// We only support checksum calculation and validation for these checksum algorithms. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum ChecksumAlgorithm { + Crc32, + Crc32c, + Md5, + Sha1, + Sha256, +} + +impl FromStr for ChecksumAlgorithm { + type Err = Error; + + /// Create a new `ChecksumAlgorithm` from an algorithm name. Valid algorithm names are: + /// - "crc32" + /// - "crc32c" + /// - "sha1" + /// - "sha256" + /// - "md5" + /// + /// Passing an invalid name will return an error. + fn from_str(checksum_algorithm: &str) -> Result { + if checksum_algorithm.eq_ignore_ascii_case(CRC_32_NAME) { + Ok(Self::Crc32) + } else if checksum_algorithm.eq_ignore_ascii_case(CRC_32_C_NAME) { + Ok(Self::Crc32c) + } else if checksum_algorithm.eq_ignore_ascii_case(SHA_1_NAME) { + Ok(Self::Sha1) + } else if checksum_algorithm.eq_ignore_ascii_case(SHA_256_NAME) { + Ok(Self::Sha256) + } else if checksum_algorithm.eq_ignore_ascii_case(MD5_NAME) { + Ok(Self::Md5) + } else { + Err(Error::UnknownChecksumAlgorithm( + checksum_algorithm.to_owned(), + )) + } + } +} + +impl ChecksumAlgorithm { + /// Return the `HttpChecksum` implementor for this algorithm + pub fn into_impl(self) -> Box { + match self { + Self::Crc32 => Box::new(Crc32::default()), + Self::Crc32c => Box::new(Crc32c::default()), + Self::Md5 => Box::new(Md5::default()), + Self::Sha1 => Box::new(Sha1::default()), + Self::Sha256 => Box::new(Sha256::default()), + } + } + + /// Return the name of this algorithm in string form + pub fn as_str(&self) -> &'static str { + match self { + Self::Crc32 => CRC_32_NAME, + Self::Crc32c => CRC_32_C_NAME, + Self::Md5 => MD5_NAME, + Self::Sha1 => SHA_1_NAME, + Self::Sha256 => SHA_256_NAME, + } + } +} + +#[derive(Debug, PartialEq)] +pub enum Error { + UnknownChecksumAlgorithm(String), +} + +impl std::fmt::Display for Error { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::UnknownChecksumAlgorithm(algorithm) => { + write!( + f, + r#"unknown checksum algorithm "{}", please pass a known algorithm name ("crc32", "crc32c", "sha1", "sha256", "md5")"#, + algorithm + ) + } + } + } +} + +impl std::error::Error for Error {} + /// Types implementing this trait can calculate checksums. /// /// Checksum algorithms are used to validate the integrity of data. Structs that implement this trait @@ -217,6 +310,7 @@ mod tests { }; use crate::http::HttpChecksum; + use crate::ChecksumAlgorithm; use aws_smithy_types::base64; use http::HeaderValue; use pretty_assertions::assert_eq; @@ -298,4 +392,12 @@ mod tests { assert_eq!(decoded_checksum, expected_checksum); } + + #[test] + #[should_panic = "called `Result::unwrap()` on an `Err` value: UnknownChecksumAlgorithm(\"some invalid checksum algorithm\")"] + fn test_checksum_algorithm_returns_error_for_unknown() { + "some invalid checksum algorithm" + .parse::() + .unwrap(); + } } diff --git a/rust-runtime/aws-smithy-http/src/operation.rs b/rust-runtime/aws-smithy-http/src/operation.rs index da25499ee5..5430459877 100644 --- a/rust-runtime/aws-smithy-http/src/operation.rs +++ b/rust-runtime/aws-smithy-http/src/operation.rs @@ -371,6 +371,16 @@ impl Response { (self.inner, self.properties) } + /// Return mutable references to the response and property bag contained within this `operation::Response` + pub fn parts_mut( + &mut self, + ) -> ( + &mut http::Response, + impl DerefMut + '_, + ) { + (&mut self.inner, self.properties.acquire_mut()) + } + /// Creates a new operation `Response` from an HTTP response and property bag. pub fn from_parts(inner: http::Response, properties: SharedPropertyBag) -> Self { Response { inner, properties }